Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

>

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.

______________________________________________________________________________

image text in transcribed

The session ID is PHPSESSID Page 1 The content of $_SESSION['sess_var') is Hello world! Two more elements were added to $_SESSION Next page Page 2 Here are all of the keys and values in the $_SESSION array course_code = cop 1842 course_name = PHP & MySQL text_publisher = Murach Next page Page 3 Here are the keys and values in the $_SESSION array NOTE that all data is gone

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago