0% found this document useful (0 votes)
48 views

PHP Assignment 6 Session and Cookie

1. Edit an email application to add a "Remember me?" checkbox that saves the username and password to a cookie. When checked, future logins will automatically fill the username and password from the cookie. 2. Continue editing a login application to prevent access to the welcome page without logging in. If a user accesses welcome.jsp and is not logged in, forward them to the login page. Store the username in the session object on login, and check for its presence in the session on each welcome page access to determine if they are logged in.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

PHP Assignment 6 Session and Cookie

1. Edit an email application to add a "Remember me?" checkbox that saves the username and password to a cookie. When checked, future logins will automatically fill the username and password from the cookie. 2. Continue editing a login application to prevent access to the welcome page without logging in. If a user accesses welcome.jsp and is not logged in, forward them to the login page. Store the username in the session object on login, and check for its presence in the session on each welcome page access to determine if they are logged in.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment for PHP module

ASSIGNMENT FOR SESSION AND COOKIE

1. Using Cookie to store username and password


Edit a Email application in assignment 4 to add a “Remember me?” checkbook as
figure 1. When the checkbox is selected, the email and password will be saved to
the cookie in client machine. Whenever user login to the application, program will
automatic detect cookie to fills the email and password to the login form.

Figure1. Login page

2. Using session object


Continue edit a login application in assignment for chapter 5 to prevent user accept
welcome page without login. When the user accesses the welcome page if he
doesn’t login forward him to the login page.

Hint:
- Change the welcome.html to welcome.jsp file.
- When the user login to the system save email to an attribute of the session
object.
- Whenever the user access the welcome page, check the email attribute in
session object. If the email is exist in session object then display welcome
page either display.

1
iViettech Education

You might also like