96turnerri
01-16-2004, 08:22 AM
hi im using this code i found on here from pyro to change a stysheelt
<?PHP
$loc = $_SERVER["HTTP_REFERER"];
$css = $_GET["file"];
setcookie("stylesheets",$css,time()+31536000); #one year
header ("Location:$loc?changeprefs=$css");
?>
header was header ("Location:$loc");
but i modifyied it so that it should be if black style sheet is selected via link on index.php htp://domain.com.index?changeprefs=Black and it is however if i now choose green
htp://domain.com/index.php?changeprefs=Green?changeprefs=Black
obviously i would like the first to not be displayed only the last or latest, one more thing (sorry) if i type in address bar
htp://domain.com/index.php?changeprefs=Green
only the last one i chose on page ie whats it the cookie is displayed
any ideas?
<?PHP
$loc = $_SERVER["HTTP_REFERER"];
$css = $_GET["file"];
setcookie("stylesheets",$css,time()+31536000); #one year
header ("Location:$loc?changeprefs=$css");
?>
header was header ("Location:$loc");
but i modifyied it so that it should be if black style sheet is selected via link on index.php htp://domain.com.index?changeprefs=Black and it is however if i now choose green
htp://domain.com/index.php?changeprefs=Green?changeprefs=Black
obviously i would like the first to not be displayed only the last or latest, one more thing (sorry) if i type in address bar
htp://domain.com/index.php?changeprefs=Green
only the last one i chose on page ie whats it the cookie is displayed
any ideas?