Lab 4 - PHP

Instructions: Check Assignments->Lab 4 PHP for more instructions and the due date. But here are the general instructions.

The purpose of this lab is to practice writing PHP code to create a dynamic web page. You will copy what you have done in lab 3 and paste it into the new phpstorm project that you created in the lab server setup. Once you paste it into this new repo, you should rename the folder lab 4.

This means that our new server-side repo (the fullstacklab one) will only have the directory lab4 for now. You will then use that workflow to push all your changes to the server from the server-side setup

You may need to change your index.html to index.php

Keep in mind you will need to add /lab4 to the end of your new URL, just as we have done since lab 0 setup.

Tasks

You will be adding code to index.php so that at the bottom of your homepage you will:

  1. Display a simple monthly calendar. (You need to write your own PHP Code here. Please, don't embed Google's calendar)

    • As an example, when I travel back in time to 2018 (ahh 2018), and I open the webpage on the date May 29, 2018, the following monthly calendar is displayed:

    img



  2. Display the names of all files in your Lab 4 directory on the web server

  3. Dynamically display all the courses you have been taken so far. (You may save the course names in a text file for your php code to read. In this way, you don’t need to modify index.php if you want to change your course list.)

Lab Submission

  • Push your lab4 folder to your full stack repo and ensure that all the files are there.
  • Ensure you have a full description that describes what you have done for the lab in a step-by-step fashion. This can either be a separate document which should be done as a md doc, (similar to a README.md) or it can be a git commit log where you commmit frequently and provide good messages in each commit.