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.
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount! Use Discount Code “Newclient” for a 15% Discount!NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.
The post php web program 3 appeared first on Nursing Writers Hub.


0 comments