variables in url and cookies ..... ????
| From: | toby z | Date: | Mon, 05 Aug 2002 12:47:52 +0000 |
| Subject: | variables in url and cookies ..... ???? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-15125@lists.php.net to get a copy of this message | ||
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