ID variable alsways set
| From: | Chris N | Date: | Sun, 03 Mar 2002 09:26:05 +0000 |
| Subject: | ID variable alsways set | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-87041@lists.php.net to get a copy of this message | ||
Ive just found a rather weird bug that im experiencing. Im running PHP 4.1.2
with Apache 1.3.23 on Linux Redhat 7. When ever I try and use variable $id
it always has a value of 1 no matter what. It only does it if its in a get,
think a post too. I can hard code it in a script and itll have a correct
value but in a GET it gets messed up. Ive tried running it several ways of
having it be first in the list or last, no matter what its always 1.
Example:
url = http://www.domain.com/test.php?id=12345&name=Kalamazoo
File :
<?php
echo "name = $name<br>";
echo "id = $id<br>";
echo "<a href=\"$PHP_SELF?id=12345&name=Kalamazoo\">click</a>";
?>
Result :
name = Kalamazoo
id = 1
click ( http://www.domain.com/test.php?id=12345&name=Kalamazoo
)
Anyone have any ideas what this could come from?