Difference between revisions of "W3818 php Collecting Data to CSV file"
Line 5: | Line 5: | ||
== Key Concepts == | == Key Concepts == | ||
== Exercises == | == Exercises == | ||
=== Part 1 === | |||
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 | |||
{{Hint| | |||
Images may be downloaded by using wget and then setting the permissions appropriately. For example: | |||
<syntaxhighlight lang="bash"> | |||
wget https://sample.images.com/apple.jpg | |||
chmod a+r apple.jpg | |||
</syntaxhighlight> | |||
}} | |||
After the above has been completed, notify your invigilator for grading. Then: | |||
=== Part 2 === | |||
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. | |||
{{Hint| | |||
In order to enable the web server to write the file, permissions will need to be adjusted. Execute the following: | In order to enable the web server to write the file, permissions will need to be adjusted. Execute the following: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 11: | Line 37: | ||
setfacl -m u:www-data:rw contacts.csv | setfacl -m u:www-data:rw contacts.csv | ||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
== References == | == References == |
Revision as of 21:21, 3 December 2019
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