##########################################
#
# PHP (4): In class exercise
#
##########################################
####################################################
# ALL OF THE FILES SHOULD BE SAVED AS .php
# Try to add enough comments in your code.
####################################################
###### Question No. 1 ##################################################
####################################################
#
# Create a simple PHP page counter with Cookies that:
# - Will greet the user only if visiting the page for
# the first time by: "Welcome new visitor!"
# - Will store the view counts in a cookie called
# "counter" on the client side
# - Will greet the user if revisiting with
# "Welcome back visitor!"
# - Will prompt the visitor with: "You have visited
# us XXX times!". Of course XXX will be the number
# of times the user has visited the web page.
#
# Screenshots are avaialble at:
# CookieCounterPre.jpg
# CookieCounterPost.jpg
#
####################################################
PHP File: CookieCounter.php
Text File: CookieCounter.txt
###### Question No. 2 ##################################################
####################################################
#
# Create a simple PHP page that has the following
# blocks of content: header, content and footer
#
# Create four files called: header.php, content.php,
# footer.php and index.php.
#
# The index.php should be the main page containing
# the formatting of the page. SSI codes should be
# used to read and place the other three files
# (header.php, content.php and footer.php)
# in each of the predefined sections of your so
# called template in the index.php file
#
# Create an external CSS file if necessary.
#
# Screenshots are avaialble at:
# header.jpg
# content.jpg
# footer.jpg
# index.jpg
#
# Screenshots of individual files do not represent the
# application of the CSS files included in index.php;
# this means that the CSS file associated with index.php
# will be applied to these files (header, content and footer)
# after they are loaded in the index.php; however the screenshots
# do not show their final status and therefore they
# seem different from the integrated versions in index.php.
#
####################################################
PHP Files:
header.php
content.php
footer.php
index.php
Text Files:
header.txt
content.txt
footer.txt
index.txt
CSS File:
style.css
###### Question No. 3 ##################################################
####################################################
#
# Create a form (form.php) that will ask the following items:
# - Patient First Name (textfield)
# - Patient Last Name (textfield)
# - City Name (dropdown > Vancouver, Halifax, Toronto, etc.)
#
# You can use the form that you have designed in previous
# sessions as a starting point.
#
# Create a PHP page (result.php) that will receive
# the data posted from form.php. In this page:
# - check and see if information are received
# - if one of them is missing exit the program (exit() command)
# - show the posted information (entered by user)
# - connet to sample MySQL database used in the class
# - query the database and find all patients that match
# the user input from form.php (even partial matching)
# - show the reuslts in a table format
#
# Screenshots are avaialble at:
# form.jpg
# result.jpg
#
####################################################
PHP Files:
form.php
result.php
Text Files:
form.txt
result.txt