Description
Purpose
• Forms
• Various ‘input’ Tags
• Session State
• Upload your website to a Web server
• This lab is must be handed in:
Assessment
• This Lab is worth 2% of your total course mark.
Estimated Time
• This Lab is estimated to take 2 hour.
This is only an estimate of the time required to complete this Lab. I would encourage you to work at your own pace and if at all possible obtain a laptop so that you can work on your assignments from anywhere
The following chapters of ‘Fundamentals of Web Development’ will be useful in completing this exercise:
• Chapter 13.6
Lab Supplies
To complete this lab you will require the following lab supplies:
• Textbook: Fundamentals of Web Development
• EasyPHP, or other WAMP server
• Eclipse, Notepad (or other text editor, or IDE)
• FileZilla (or other FTP client)
Summary of Tasks
1. Develop the logic to display your web application
2. Upload your website to the webserver
3. View your webpage using a web browser
4. Submit Assignment Link on Blackboard
5. Submit Source Code of all PHP files on Blackboard
Task 1
Before getting started with the following tasks, review the ‘Common Look and Feel’ video provided on Blackboard (under: Course Content → Extra Materials). Using the knowledge gained in these materials, implement the following Design Pattern to create a ‘Common Look and Feel’ to be used on every page of your website.
Your web site will include the following PHP scripts:
• Header.php
• Footer.php
• Menu.php
• Input.php
• Session1.php
• Session2.php
NOTE: Input.php, Session1.php, Session2.php all must include the Common look and feel implemented in Header.php, Footer.php and Menu.php.
Header.php
Header.php must contain a script to display a Common Header that will appear on every page. The header must contain a banner (images, css, etc).
Footer.php
Footer.php must contain a script to display a Common Footer that will appear on every page. The footer must contain Student Number, First Name, Last Name, and Email Address
Menu.php
Menu.php must contain a script to display a Common Menu to be show on every page. The menu must contain links to Input.php, Session1.php and Session2.php
Input.php
Create a PHP script that will perform the following tasks:
1. Divide the content area of this page into two sections (Side by Side)
2. On the left side: create a form that accepts the following information from the user
a. Text box, First Name
b. Text box, Last Name
c. Text box, Telephone Number
d. Radio Button List, with the values Staff, Student and Faculty
e. Select, a multiple select box that lists 4 computer games
f. Submit button with the text ‘Submit Information’
3. On the right side: When the user clicks ‘Submit Information’ gather all the information from the form on the left side and display the results on the right side
Session1.php
Create a PHP script that will perform the following tasks:
1. Implement the same form listed in Input.php, Part 2
2. This time, when the user clicks ‘Submit Information’ , store all the information gathered from the form in the Session State
3. Automatically Redirect the user to Session2.php
Session2.php
Once the user is forwarded to Session2.php, display the results of the information gathered in the form on Session2.php
NOTE: Forms, Session_RetrieveValues.php, Session_StoreValues.php (Posted on Blackboard) provide examples of how to do all of these things.
Task 2
Upload your website to the Web server. Use an FTP client to connect to your Web server.
Once you connect to the webserver using an FTP client, create a directory called
‘/CST8238/Lab8’. Once your course directory has been created navigate to that new directory. Add your index.php file to this location. (Using FileZilla simply drag the index.php file into your folder). Add all of your PHP files to this location.
We recommend the FTP client Filezilla. The program is provided for free (and open source for those who are interested in such things) by the Mozilla Foundation; the makers of Firefox and Thunderbird.
For more information on using FileZilla please navigate to the following material in Blackboard:
Course Content → Extra Material → FileZilla Guide (Video)
Task 3
View your website using a web browser. Open a web browser and navigate to the following web address:
http://web-server_domain_name/CST8238/Lab8/<filename>
For example, the web address to my page is:
http://profrejaul.com/CST8238/Lab8/index.php
Where ‘profrejaul.com’ is the domain name of the Web server, ‘ /CST8238/Lab8’ is the name of the directory I created in the Web server using FTP client and ‘index.php’ is the web page I created for this lab.
Task 4
Once you have confirmed that your webpage is available online, you are ready to hand in your lab.
To hand in your lab go to Blackboard and navigate to Course Content → Labs and click on ‘Lab 8 – Forms and Session State’ link.
Under “Assignment Submission”, in the Submission text box write out the following Information:
• Student Number
• First Name
• Last Name
• The URL, or hyperlink, prepared in Task 3
Under “Assignment Submission”, submit (attach) source (PHP) code of the following files as a single .zip file:
• Header.php
• Footer.php
• Menu.php
• Input.php
• Session1.php
• Session2.php
Finally, once the Submission section is complete, click the ‘Submit’ button to send the lab to your professor.
IMPORTANT NOTE:
If the URL, or hyperlink, does not direct the professor to the lab you will receive a ZERO for the lab assignment.
IMPORTANT NOTE:
Reviews
There are no reviews yet.