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 ([EMAIL PROTECTED]) 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"; };
> ?>
> 
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to