Check your php.ini and make sure that register_globals is turned on. Either that or use: if ($_REQUEST['a'] == "X") which will give you the variable if its posted, in the query string or a cookie.
Second is better in terms of portable code. Matt > -----Original Message----- > From: Sandeep Murphy [mailto:[EMAIL PROTECTED]] > Sent: 06 September 2002 11:10 > To: hans; [EMAIL PROTECTED] > Subject: RE: [PHP-WIN] problem with querystring > > > hi, > > i chked on my local m/c and it works fine... though i hv win > 2k prof on my PC... Can u test the code on another PC?? > > -----Original Message----- > From: hans [mailto:[EMAIL PROTECTED]] > Sent: sexta-feira, 6 de Setembro de 2002 8:09 > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] problem with querystring > > > hi there, > > i'm having this very strange problem using a querystring... > to illustrate me > problem i have this file: > > <form method="post"> > a: <input type="checkbox" value="X" <? if ($a == "X") echo "checked" > ?>><br> > b: <input type="checkbox" value="X" <? if ($b == "X") echo "checked" > ?>><br> > </form> > > called test.php... when i open the url tesp.php?a=X the > checkbox doesn't get > checked, and as far as i know some PHP it should be... i'm having this > problem with every querystring i use... i'm working with > release 4.1.1 on a > Windows XP Prof machine... > > anyone has got an idea? > > chears, > hans > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >