At 09:58 27.11.2002, Stéphane Génin said:
>I want to read the parameters in the URL, but I can't find the right way to
>do that. I've tried several things :
>my URL is: http://localhost/test.php?id=abc
Check out the PHP manual at
>I tried to use the $id, but in this case, I have a notice with 'undefined
>I have the same problem if I try the variable $QUERY_STRING (still undefined
>Do you know what is the best way to read this parameters?
Most certainly, register_globals is OFF in your php.ini. This is the
default setting since PHP 4.2, for security reasons. Read
on the security issues with register_globals = on.
To access parameters, generally use the superglobals arrays $_GET
(parameters passed in the URL), $_POST (passed in posted forms), $_REQUEST
(both get and post combined), and $_COOKIE (cookies passed to your script).
Hope this gets you started. You may always find it helpful to refer to the
_extremely_ well done online manual at http://www.php.net/manual/en/.
>O Ernest E. Vogelsinger
(\) ICQ #13394035
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php