This is a server-side scripting This is intended to be a simple assignment to ensure that you all can: • read the documentation at php.net and call a function using the information found in that documentation • process information submitted to your script via an HTTP request and incorporate it into an expression Objectives • Familiarize Yourself with documentation from php.net • Use mathematical operators in PHP • Handle form input from a form you did not write Directions In your private directory, create a subdirectory called module02assign02c In the subdirectory module02assign02c create a file called index.php For the main content, you are to output four different things, but only two that are nontrivial: 0.1. Opening. Within your file, first output some HTML, CSS, and explanatory text that sets the stage for the main content. 0.2. Date. Call the date function and you are to have it output the following: • the full name for the day of the week • a comma • a space • the full name for the month of the year • a space • the day of the month without leading zeros • the ordinal for the day of the month (st, nd, rd, th, etc...) • a comma • a space • the year with all four digits • a comma • a space • the hour of the day (12 hour format) without leading zeros • a space • AM or PM, capitalized Note that you can do all this with a single call to date with the appropriate format string as the argument to it. Note that this is all for the current date/time.
This is a server-side scripting
This is intended to be a simple assignment to ensure that you all can:
• read the documentation at php.net and call a function using the information found in that documentation
• process information submitted to your script via an HTTP request and incorporate it into an expression Objectives
• Familiarize Yourself with documentation from php.net
• Use mathematical operators in PHP
• Handle form input from a form you did not write Directions In your private directory, create a subdirectory called module02assign02c In the subdirectory module02assign02c create a file called index.php
For the main content, you are to output four different things, but only two that are nontrivial: 0.1. Opening. Within your file, first output some HTML, CSS, and explanatory text that sets the stage for the main content. 0.2. Date.
Call the date function and you are to have it output the following:
• the full name for the day of the week
• a comma
• a space
• the full name for the month of the year
• a space
• the day of the month without leading zeros
• the ordinal for the day of the month (st, nd, rd, th, etc...)
• a comma
• a space
• the year with all four digits
• a comma
• a space
• the hour of the day (12 hour format) without leading zeros
• a space
• AM or PM, capitalized
Note that you can do all this with a single call to date with the appropriate format string as the argument to it. Note that this is all for the current date/time.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images