W3818 php Collecting Data to CSV file
Prerequisites[edit]
Background[edit]
Introduction[edit]
Topic Headers[edit]
Key Concepts[edit]
Exercises[edit]
Part 1[edit]
You've been commissioned to create a new website for your local zoo. Create a website promoting the zoo:
- Comprised of at least two pages linked to one another
- Using CSS formatting that includes at least:
- Centered text
- Colored text
- Colored background
- Two each of class and id selectors
- Three different font sizes/styles
- Containing at least ten relevant images, positioned and sized appropriately
- Aesthetically designed
Images may be downloaded by using wget and then setting the permissions appropriately. For example:
wget https://sample.images.com/apple.jpg
chmod a+r apple.jpg
After the above has been completed, notify your invigilator for grading. Then:
Part 2[edit]
Create a third page which contains a contact form and collects, at minimum, the user's first name, last name, and email address. When the user submits the form, a php script must be executed which stores all of the fields along with a timestamp into a file called "contacts.csv".
After the above has been completed, notify your invigilator for grading.
In order to enable the web server to write the file, permissions will need to be adjusted. Execute the following:
touch contacts.csv
setfacl -m u:www-data:rw contacts.csv