[PHP] Re: PHP url variables

2003-03-14 Thread Cranky Kong
Have a look at the parameter register_global in your php.ini
By default in the recent version of PHP, this parameter is set by default to
off for security reason.
So if you want to use $id, you just have to set this parameter to on


Stephen [EMAIL PROTECTED] a écrit dans le message de news:
[EMAIL PROTECTED]
 Hi

 I have just installed PHP 4 and Apache 2 but when I pass a variable in a
url
 eg ?id=1
 I can't get the variable value by $id, I have to use $_GET['id'] or
 $_POST['id']

 Is there a setting I need to change to allow me to use the $id? If there
is
 it will save a lot of additional coding.

 Thanks,

 Stephen





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



[PHP] Re: PHP url variables

2003-03-13 Thread Ron Rudman
Try:
parse_str( $_SERVER['QUERY_STRING']);

Stephen [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi

 I have just installed PHP 4 and Apache 2 but when I pass a variable in a
url
 eg ?id=1
 I can't get the variable value by $id, I have to use $_GET['id'] or
 $_POST['id']

 Is there a setting I need to change to allow me to use the $id? If there
is
 it will save a lot of additional coding.

 Thanks,

 Stephen





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