You should use $HTTP_POST_VARS (or $_POST) all of the time.  There's security risks in 
using register_globals. It's not risky in all cases. But register_globals will allow 
arbitrary variables to be added to into the name space of your script by simply 
putting them on the uri.  Code not expecting such input, and expecting variables not 
to exist unless the script set them may behave unexpectedly.

The reason the variable is not set is that the checkbox isn't checked.  You can test 
the variable with isset(), or empty() before you use it so you don't get the warning.

To learn what your script it seeing when you submit the page, do a:
foreach ($HTTP_POST_VARS as $key => $value) {
echo "Key: $key Value: $value<br>\n";
at the top of your action handler script, and watch the variables come in when you 
check or not check the checkboxes.  Once you understand that, then write the code to 
handle the situation.

> -----Original Message-----
> From: savaidis [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, April 04, 2002 10:17 AM
> Thank you both for help and info! You were both very fast :)
> I didn't know I could  not to use $HTTP_POST_VARS . Now it 
> works all right.
> But IF I still want  to use $HTTP_POST_VARS, what then? What about the
> warning when checkbox is not checked?

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to