Question: In this assignment, you will be writing a PHP script that will set a cookie on one page and then pass the cookie to a

In this assignment, you will be writing a PHP script that will set a cookie on one page and then pass the cookie to a second page. This will require some research on your part.
Page 1
- Set the cookie value.
- Set the cookie to expire in 1 day.
- Set the cookie.
- Redirect to another page.
Page 2
- Check to see if the cookie is set.
- Get the cookie value.
- If the cookie is set display the cookie value.
- If the cookie is not set display "The cookie is not set."
When you load Page 1, the PHP script will automatically execute and then redirect the browser to the second page that should display the cookie value. Your results should look something like this:
The value of the cookie is: example_cookie_value
In this assignment, you will be writing a PHP

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 Programming Questions!