php web program

Apr 21st, 2014
Anonymous
Category:
Programming
Price: $10 USD

Question description

create and use cookies from within PHP.

Instructions:

1.  Create a page ‘Login.php’ that asks the user for a username and password. The validation simply needs to be that the username is not blank and the password contains the word ‘secret’. If the username or password is incorrect, the user will be re-prompted for their id and password (use a non-sticky form). If the values are acceptable/correct, the page will start a session and direct the user to the ‘Welcome’ page.

2.  Create a page ‘Welcome.php’ that will be used to greet returning users. The page will greet the user by their username and display the logo of their favorite football team if they have selected one (see step 5).

3.  If the user attempts to access the ‘Welcome’ page without having a valid session, they will be redirected to the login page.

4.  If the user attempts to access the ‘Login’ page while there is an active session, they will be redirected to the ‘Welcome’ page.

5.  Create a page that displays a listing of football teams and their logos. A valid user will be allowed to select/reselect one of these as their favorite team. Save their choice as a cookie. If a user attempts to access this page without being logged in, they will be redirected to the login page.

6.  The ‘Welcome’ page will provide a link to the page allowing the user to select their favorite football team.

7.  The ‘Welcome’ page will provide a link allowing the user to logout. When the user is ready to log out, end the session. Once the user has been logged out, they will be redirected to the ‘Login’ page.


Tutor Answer

(Top Tutor) cybermaniax
School: Boston College

Studypool has helped 1,244,100 students

Review from student
Anonymous
" Top quality work from this guy! I'll be back! "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1822 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors