RE: [PHP-WIN] variables in url and cookies ..... ????
| From: | Ross Fleming | Date: | Mon, 05 Aug 2002 13:01:13 +0000 |
| Subject: | RE: [PHP-WIN] variables in url and cookies ..... ???? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-15126@lists.php.net to get a copy of this message | ||
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.
As for $PHP_SELF, use $_SERVER["$PHP_SELF"] instead I think.
Ross
> -----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>  
>
> <a href='$PHP_SELF?lang_id=" . "2" . "' >
> sindhy </a>  
>
> <a href='$PHP_SELF?lang_id=" . "0" . "' >
> pachto </a>  
>
>
>
> </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
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>