Well if you have several options then this will work.
<a href="background.php?
colour=red">Red design</a>
Then on all other pages just write something similar to ~
PHP:
1. <?php if(isset($_GET['colour']) && $_GET['colour']=="blue" || $_GET['colour']=="red") {
2. if(!isset($_COOKIE['Colour'])){
3. setcookie("Colour",$_GET['colour'])?>
4. body{background:url("path/to/<?php echo $_GET['colour'];?>.png")}
5. <?php }
6. }if(isset($_COOKIE['Colour']) && $_COOKIE['Colour']=="blue" || $_COOKIE['Colour']=="red"){?>
7. <body{background:url("path/to/<?php echo $_COOKIE['Colour'];?>.png")}
8. <?php }else{?>
9. <body{background:url("path/to/default.png")}
10. <?php }?>
1. Test to see if the get variable is set and that it is set to 1 of the backgrounds that you want, add the double pipe followed by $_GET['Colour'] followed by double equal sign followed by the background's name in quotes to add more to test by. Important otherwise they could get any file really not something you want to happen.
2. We then test to see if the cookie is set.
3. If it is not set it to the get variable which we know can only be 1 of a few things.
4. Set the background of, I used the body tag but you could add a linked in CSS sheet in their.
5. We end the cookie test.
6. We end the get test and start a test looking for the cookie and if it is found test to make sure it only contains data we want.
7. Set the body tag to the background set in the cookie.
8. End the cookie test.
9. If the user came to the page and neither are set show the default background.
10. End the last else.
bare in mind that will mean that the session cookie will take precedence, if you want the get to take precedence let me know.
Let me know if you get an error.
Now if you just have 1 link rather than a selection we can create it dynamically and add the right get variable on.
Jaz