Re: PHP Skinning Problem

From: Date: Sun, 19 May 2002 23:38:51 +0000
Subject: Re: PHP Skinning Problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-98399@lists.php.net to get a copy of this message
Not sure about the query string thing... what version are you running? If you have register_globals Off in your php.ini (as discussed MANY times on this list), $skin won't be set... it'll be $_SESSION['skin']. Simple changes: <?php // use session var, or if not found, use defauly if(isset($_SESSION['skin'])) { $skin = $_SESSION['skin']; } else { $skin = "black"; } // set colours if($skin=="black") { $skin="#000000"; $text="#FFFFFF"; }; elseif($skin=="white") { $skin="#FFFFFF"; $text="#000000"; }; ?> Justin French Indent.com.au on 20/05/02 9:08 AM, Darren Edwards (darren@worldwwf1.cjb.net) wrote: > Can some one please tell me why this PHP command brings back an Undefined > variable: QUERY_STRING on line 1. The script is below, by the way it is PHP > on windows not unix. > > <?php SetCookie("skin", "$QUERY_STRING", time()+3600); ?> > > > Also can some one please tell me why this is bringing back a problem on a > windows server. > > <?php > if($skin=="black") { $skin="#000000"; $text="#FFFFFF"; }; > if($skin=="white") { $skin="#FFFFFF"; $text="#000000"; }; > ?> > > >

« previous php.general (#98399) next »