Question: < < PHP >> Instructions Create a new PHP project with your name in the title as before. In the project, create these three files.

<< PHP >>

Instructions

Create a new PHP project with your name in the title as before. In the project, create these three files. NOTE: in this assignment the $_SESSION[ ] array elements are referred to as session cookies.

1. page1.php

  • start a session and display the session ID.
  • assign the string 'Hello world' as a session cookie. You pick the key for this element.
  • then use the $_SESSION array to display the string in this latter cookie.
  • assign two more session cookies (you make up the keys and values), but don't display these.
  • add an HTML hyperlink that will execute page2.php when clicked.

2. page2.php

  • assign 'Murach' to another element of $_SESSION. Use the key 'publisher'.
  • delete the cookie that stored 'Hello world'.
  • use a foreach loop to display all session cookie names and values.
  • add another hyperlink that will execute page3.php when clicked.

3. page3.php

  • delete all session cookies and destroy the session on the server.
  • delete the session cookie from the browser.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!