[PHP] PHP Skinning Problem

2002-05-19 Thread Darren Edwards

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=#00; $text=#FF; };
if($skin==white) { $skin=#FF; $text=#00; };
?




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




Re: [PHP] PHP Skinning Problem

2002-05-19 Thread Justin French

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=#00; $text=#FF; };
elseif($skin==white)
{ $skin=#FF; $text=#00; };

?


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=#00; $text=#FF; };
 if($skin==white) { $skin=#FF; $text=#00; };
 ?
 
 
 


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