Lab #3 - PHP Web Session Management

CS 183 - Hypermedia and the Web

This lab assignment involves implemementing some simple session management using PHP.

What you must do is write a PHP script that can do the following: 1) generates a form for user input and 2) generates a "Welcome" page based on the user's input.

If a user goes to your page for the first time since she opened her browser, you need to display the form page. This page must allow the user to enter her name and 3 favorite URLs. Once entered, the user should be directed to the "Welcome" page. This page must acknowledge the user by name with a message like "Welcome Sasha!" and provide the entered urls as usable links to take the user elsewhere.

If the user is to use any other links or leave the page for any other reason and later return, the page should have the user's context saved such that the "Welcome" page and not the "Form" page should be displayed. Additionally, the welcome page must have a mechanism to clear the context for that particular user and return to the "Form" page for new user information collection. You could possibly display a link saying something like "If not Sasha click here..." which targets your PHP page with a command to reset.

For submission please email Sasha [at] cse [dot] ucsc [dot] edu your php script and a URL to the script on a working webserver such as your user directory on the people.ucsc.edu servers.

Last modified: 2/13/2004