the way i see the solution for backgrond changing is some work of php/javascript.
it wouldn't be nice if i would be doing your job or someone else, afterall i guess you shouldn't even ask for that
))
but i had some free time and refreshed my memory of school stuff ....... (just note, if user e.g uses "clear private data" and deletes the cookie, he won't have the data saved
)).
here is the code:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language="JavaScript" type="text/javascript">
function bground()
{
var Name="Bground";
var bground = new String(document.Bground.selectbackground.options[document.Bground.selectbackground.selectedIndex].value);
var ends = new Date();
ends.setTime (ends.getTime() + (365 * 24 * 60 * 60 * 1000)) // set expiration date, i set to 1 year :))
document.cookie = "" + Name + "=" + bground +";expires=" + ends.toGMTString()+"; path=/";
return true;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Background change example</title>
</head>
<body bgcolor="<?php if(!isset($_COOKIE["Bground"]))
{ echo "#9CDEF3";
}
else
{ echo $_COOKIE["Bground"];
} ?>">
<form name="Bground" action="<? PHP_SELF ?>" >
<select name="selectbackground" size="1" class="style7">
<option value="#9CDEF3">Default</option>
<option value="#FFFF00">Yelow</option>
<option value="#00FF00">Green</option>
<option value="#FFFFFF">White</option>
<option value="#FF9900">Orange</option>
</select><br /><br />
<input name="" type="submit" value="Change background" onclick="bground();"/>
</form>
</body>
</html>
good thing with the code is that you can use same cookie and same trick to have same custom bg color on each page you want.
P.S. i've just copy pasted entire page so that you can see it better.
javascript function in head of the page.
echoing the bgcolor value in body tag.
i've tried to make form the most intuitive as i could with the names.
gl with your page
))))