Re: [PHP] ID variable alsways set

2002-03-04 Thread Erik Price


On Monday, March 4, 2002, at 02:25  AM, Rasmus Lerdorf wrote:

> Do a phpinfo() and check to see if you  perhaps have a cookie with the
> name "id" set with the value "1".  If your look at variables_order in 
> your
> php.ini file, you will see that cookie data will override get-method 
> data.
> To force a read from the GET data, use $_GET['id'] instead of $id.

This post gave me an idea -- is it possible to write a quick mini-script 
that would allow me to see the contents of all cookies stored in my 
browser in a web page?  I know that technically I could just open up the 
browser's prefs and look at them this way, but I could format the cookie 
list/contents better with a script, and it wouldn't require me clicking 
all over my preferences (I have a lot of cookies too).

Just a thought.

Erik





Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] ID variable alsways set

2002-03-03 Thread Rasmus Lerdorf

Do a phpinfo() and check to see if you  perhaps have a cookie with the
name "id" set with the value "1".  If your look at variables_order in your
php.ini file, you will see that cookie data will override get-method data.
To force a read from the GET data, use $_GET['id'] instead of $id.

-Rasmus

On Sun, 3 Mar 2002, Chris N wrote:

> 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 :
>  echo "name = $name";
> echo "id = $id";
> echo "click";
> ?>
>
> 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?
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] ID variable alsways set

2002-03-03 Thread Chris N

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 :
";
echo "id = $id";
echo "click";
?>

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?




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php