Unchecked checkboxes pass no values, that's how
it works. It's either set or not. Default value
for a checkbox is 'on' although you can change
that. isset() will work fine.
Regards,
Philip
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
> >But IF I still want to use $HTTP_POST_VARS, what then? What about the
> >warning when checkbox is not checked?
> I use empty() to check the for the existence of checkbox variables.
You can also use isset();
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: htt
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 expectin
At 18:17 04-04-02 +0300, savaidis wrote:
>But IF I still want to use $HTTP_POST_VARS, what then? What about the
>warning when checkbox is not checked?
I use empty() to check the for the existence of checkbox variables.
--
-
Eu
Message-
> From: Jason Wong [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 04, 2002 5:51 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] checkbox doesn't pass?
>
>
> On Thursday 04 April 2002 20:46, [EMAIL PROTECTED] wrote:
>
> > why do you use $HTTP_POST_VARS? Do
On Thursday 04 April 2002 20:46, [EMAIL PROTECTED] wrote:
> why do you use $HTTP_POST_VARS? Do I miss something?
For security reasons.
Manual > Security
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
/*
Above all things, reverence yourself.
*/
--
PHP General Mailing List (ht
At 04.04.2002 15:23, you wrote:
>
>
>I have a html form with some "text" (T1) and "checkbox" (C1) fields to pass
>it to a php script.
>
>Accessing "text" fields has no problem.
>
>There is a problem when I use
>$C1=$HTTP_POST_VARS['C1']
>to take the value of C1 (ON)
>If it is not checked, then it
7 matches
Mail list logo