At 09:58 27.11.2002, Stéphane Génin said: --------------------[snip]-------------------- >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 http://www.php.net/manual/en/reserved.variables.php#reserved.variables.get >I tried to use the $id, but in this case, I have a notice with 'undefined >variable'. >I have the same problem if I try the variable $QUERY_STRING (still undefined >variable). > >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 http://www.php.net/manual/en/security.registerglobals.php 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/. Regards, -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php