Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

n this homework assignment we use a few functions that we studied in this topic.

ID: 3637552 • Letter: N

Question

n this homework assignment we use a few functions that we studied in this topic. Please follow the steps below and post the link to the homework webpage in this forum for a grade. As always you are encouraged to be as creative as you want, but make sure you follow the instructions as well! Don't forget to refer to http://php.net for more information on php functions such as date() that you will be using in this assignment.

IMPORTANT: Before submitting your work, make sure you follow every detail on this page. Any sentence that does not EXACTLY follow the message below word by word, or does not calculate the phrases shown in RED UNDERLINE BOLD below as variables calculated on-the-fly inside the php script, will get 1 out of 30 for the grade, no exceptions. Steps 1-5 have total of 15 points and Step 6 below has 15 points on its own for a total of 30 point for this assignment.
Create a php file called functions.php in lab3/ folder in your home directory on the lamp server under web250/.
Start a new paragraph by typing this code: echo "<p>";
Use the date() and mktime() functions to print out a message like this: "You have an appointment on Friday January 20th, 2012 at 6PM. There are 7 days and 4 hours until your appointment. The next appointment is one week after on Fri 01/27 which is in the current month."
Remember that the information should be valid and real-time for every date assumed instead of the above appointment day, and on every day this script is running, meaning that all the underlined words in red MUST be variables that depend on the appointment's day and time and today's date. Make sure the ordinal suffixes are correct and they are superscript: 1st, 2nd, 3rd, 4th, ... Also remember that the next appointment can be "in the current month" or "not in the current month".
Note: For appointments in the past (e.g. if the current date is greater than the date of appointment by 10 days and 2 hours), you should display the following phrase instead of the corresponding one above: 10 days and 2 hours have passed since your appointment. (Hint: a simple if statement should do the job)
(15 points) Last required step: Use the information you learned in topics 2 and 3 to create an index.html file with a textbox and a submit button. The user uses the textbox (named date) to submit a valid date to your php script using the POST method. Your php script should use that date as your next appointment date (replacing 01/20/2012 in the example above).
(Optional) optionally you can have a separate textbox to define the time of the appointment (named time). If not, your php script should always assume 6PM as the time of the appointment.
That's it. Now copy the link to your index.html page here on this forum.

Explanation / Answer

I need help with the same thing