Re: SV: [PHP4BETA] isset(checkbox) vs. isset(text)
| From: | Michael Loftis | Date: | Mon, 21 Feb 2000 19:02:03 +0000 |
| Subject: | Re: SV: [PHP4BETA] isset(checkbox) vs. isset(text) | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-10611@lists.php.net to get a copy of this message | ||
Actually this is a browser issue. Browsers will return, in
leiu of a value a null string to indicate a checked
checkbox. If the box isn't checked and there is no value
statement it doesn't return the variable. IE if it has a
value it gets set if true, otherwise you get a empty string
But this all depends on the browser. The normal behaviour for
un-valued checkboxes that are un-checked is not to return it
at all. And valued boxes get either a empty string if unchecked
or the value. But not all browsers do it like that heh.
On Monday, February 21, 2000 at 01:55:12 PM, Johan Ekenberg wrote:
> > if a variable for your checkbox should be created, which value would you
> > expect
> > if the user sends it unchecked??
>
>
> I'd expect it to have an empty value, ie the empty string.
> There are IMHO at least 2 problems with the current behaviour:
> 1. It's inconsistent. If an unchecked checkbox doesn't define a
> variable, an empty <input type 2. Since "definedness" is not consistently
> handled, one
> can not use this to check dynamically created HTML forms for their
> actual FORM fields.
>
> Best regards,
> /Johan Ekenberg
>
--
Michael Loftis
ICQ: 15648280 AIM: DyJailBait
Funny quip of the moment just happens to be....
Linux is like a tent:
no gates, no windows, and an Apache inside!