WEBD-325-45/week-02
2022-04-04 05:40:45 +02:00
..
homework Week 2: PHP Scripts - Public and Staff Web Sites 2022-04-04 05:40:45 +02:00
project Week 2: PHP Scripts - Public and Staff Web Sites 2022-04-04 05:40:45 +02:00
README.md Week 2: PHP Scripts - Public and Staff Web Sites 2022-04-04 05:40:45 +02:00

Homework: PHP Scripts

Using PHP scripts, complete the following problems:

  • In your first PHP web application, use the printf() function to write a single line of code that takes a month (from 1 to 12), a day (from 1 to 31), and a four-digit year, and display the resulting date, formatted in mm/dd/yyyy format. Don't forget to add a zero in front of the month or day if it's less than 10.
  • A factorial of any given integer, n, is the product of all positive integers between 1 and n inclusive. So the factorial of 4 is 1 × 2 × 3 × 4 = 24, and the factorial of 5 is 1 × 2 × 3 × 4 × 5 = 120. This can be expressed recursively as follows: If n == 0, return 1. (This is the base case) If n > 0, compute the factorial of n1, multiply it by n, and return the result

In a second PHP web application, write a PHP script that uses a recursive function to display the factorials of the integers 0 to 10.

See homework...

Project: Public and Staff Web Sites

Create your public and staff web site. In your submission, include all of the HTML and CSS pages you used to create the frame of your site. Also, include any static (non-updatable text) on your pages. You can use placeholder text for now, but be sure in your final submission, to include the real text for your sites. Any images, videos, or content you have also can be posted using HTML and/or CSS. Be sure to include a navigation bar which will allow the user to navigate your site and include all content on each page in the navigation bar, including any forms, login systems, etc. To submit your work, zip up your projects folder that contains the files and then submit the zip file in this assignment.

Please DO NOT add the PHP code to any forms or login systems as that will all be added in later weeks (starting in week 3).

Hint:

The index (Home) page and any of your pages on the navigation bar, even though it states it should be an HTML page above, would be easier to manage with a .php extension. This week you are only doing HTML and CSS code, but make sure all your pages (excluding the CSS template) would be saved as a PHP page for when you begin programming your site using PHP code.

See project proposal...