Color My Background

This pages allows you to select the background color for the page which sets a cookie so that when you revisit the page, the color is set correctly. Not only are you setting the background color but you are choosing the entire "look" of the page, font family and heading colors. In actuality, I am using a cookie to set the stylesheet (cool idea Hank!). If you do not pick anything, the default is set to my PHP style sheet.

Make a Choice:

After you submit, click here to see the page displayed with your selection.

What Are My Variables Set At?

if you do not see anything below, then nothing is yet set in the COOKIE array.

My Variables

There are two variables used in this assignment, $clientPreferredStyle which is the cookie variable, and $pickme which is set by choosing a stylesheet and clicking the submit button. $clientPreferredStyle = $pickme.

How it Works

Pick the stylesheet and then click submit. That sets the cookie which will not show the effect until you click the link to go to the second page or hit the refresh button. You can also come back to this page and the cookie setting will be persistent until you make a new choice (click submit) or the cookie expires (which I have set this cookie to expire in 1 day).

Back to the Assignment Index Page.