RE: [PHP-WIN] variables in url and cookies ..... ????

From: Date: Tue, 06 Aug 2002 06:25:42 +0000
Subject: RE: [PHP-WIN] variables in url and cookies ..... ????
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-15136@lists.php.net to get a copy of this message
thnx ross If you're using php v4.2 upwards, don't use the > $HTTP_POST_VARS[''] array, > or the $HTTP_COOKIE_VARS[''] array. Use $_POST[''] > and $_COOKIE[''] > instead. i did but cokkies still aint seem to be workin ... :S > As for $PHP_SELF, use $_SERVER["$PHP_SELF"] instead > I think. no it give me a horrid error : Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in e:\final project\zroot\regoff1.php on line 13 my line 13 is : <a href='$_SERVER['$PHP_SELF']?lang_id=" . "1" . "' >urdu</a> &nbsp :( ... but it works fine with $PHP_SELF what should i do ???? Sichta >I can't see lang_id as a input field in form !!!! its not an input field its suppossed to be passed to the page along vid 1 of its three id so that the language gets changed ..... according to the selection guys hlp me here plz .... ive jst been reading these security issues and there they say anyone can pass his variables thru GET and ?var its the only way i ve found to pass my variables with a link ?var doent work with $_POST do i ve anyother options ???? thnx a million ...... toby ..... > > -----Original Message----- > > From: toby z [mailto:blue_myth_1@yahoo.com] > > Sent: 05 August 2002 13:48 > > To: php hlp list > > Subject: [PHP-WIN] variables in url and cookies > ..... ???? > > > > > > > > hi guys > > > > two problems .... > > > > 1. im stuck again with variables > > i cnt seem to pass them thru url and catch em > > > > 2. i need cookies i ve been trying this small > piece of > > code but it doesnt seem to work > > no errors though ...... > > > > > > <?php > > > > if($HTTP_POST_VARS['lang_id']==1){ > > echo($HTTP_POST_VARS['lang_id']); > > } > > > > echo ("<form action=regoff2.php method=post> > > > > <input type=text name=name></input> > > > > <input type=submit value=kik></input> > > > > <a href='$PHP_SELF?lang_id=" . "1" . "' > > > urdu</a> &nbsp > > > > <a href='$PHP_SELF?lang_id=" . "2" . "' > > > sindhy </a> &nbsp > > > > <a href='$PHP_SELF?lang_id=" . "0" . "' > > > pachto </a> &nbsp > > > > > > > > </form> > > > > > > > > "); > > $HTTP_POST_VARS['name']; > > $HTTP_POST_VARS['lang_id']; > > $HTTP_COOKIE_VARS['lgnzaban']; > > > > > > echo($HTTP_POST_VARS['lang_id']); > > > > > > ?> > > > > > > ---------- > > regoff2.php > > ----------- > > > > <?php > > > > > > echo ($HTTP_POST_VARS['name']); > > echo($HTTP_POST_VARS['lang_id']); > > > > //if(isset($setcooky)){ > > print $HTTP_COOKIE_VARS['lgnzaban']; > > > > //} > > ?> > > > > it prints the name fine .... > > but nuthin else > > not even lang_id > > i want it printed since i ve to accosiate some > > functionality with lang_id :S > > > > how shall i fix it up ..... > > > > > > thnx a million > > damzel in destress .... > > toby .... __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com

« previous php.windows (#15136) next »