Term 1 review and your own mini-project
Answers are for parents and teachers.
1
Draw a tree for the site map of your own invented club with at least four pages, and write the job of each page.
Any tree with a home page and at least four linked pages, each with a short job such as list, add, search or help.
2
Two tables: Clubs and Events, one club with many events. Name the primary keys and the foreign key.
Primary keys: club_id in Clubs, event_id in Events; foreign key: club_id inside Events.
3
Predict the output: $n = 3; if ($n > 5) { echo "big"; } elseif ($n > 1) { echo "mid"; } else { echo "small"; }
mid
4
A switch on $k = 2 has case 1: echo "x"; break; case 2: echo "y"; case 3: echo "z"; break; default: echo "w"; What is printed?
yz (case 2 has no break, so case 3 runs, then break).
5
Write one sentence that says which part of your project runs on the server and which in the browser, and a test table row for it.
PHP and the database run on the server; the browser shows the HTML it receives. A row has an input and the expected output.