Re: making a tutorial
| From: | T.Lensselink | Date: | Fri, 17 Mar 2006 08:44:24 +0000 |
| Subject: | Re: making a tutorial | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-232092@lists.php.net to get a copy of this message | ||
Sameer N Ingole said:
> Gustav Wiberg wrote:
>>
>> ----- Original Message ----- From: "John Taylor-Johnston"
>> <jt.johnston@USherbrooke.ca>
>> To: "PHP-General" <php-general@lists.php.net>
>> Sent: Friday, March 17, 2006 7:51 AM
>> Subject: [PHP] making a tutorial
>>
>>
>>> I'm making a tutorial and don't really understand how to do this
>>> myself :)
>>>
>>> <p>Which of the following pets do have at home:
>>> <br /><input type="checkbox" name="favourite[]"
>>> value="dog">dog
>>> <br /><input type="checkbox" name="favourite[]"
>>> value="cat">cat
>>> <br /><input type="checkbox" name="favourite[]"
>>> value="snake">snake
>>> <br /><input type="checkbox" name="favourite[]"
>>> value="other">snake
>>> <br /><input type="checkbox" name="favourite[]"
>>> value="none">none of
>>> these
>>> </p>
> [snip]
>> I don't know if this works in PHP as well.
> It is a "checkbox" so it won't work without "[]" in PHP.
>
> Regards,
>
> --
> Sameer N. Ingole
> Blog: http://weblogic.noroot.org/
> ---
> Better to light one candle than to curse the darkness.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
It will work without []. It will just not be an array.
For checkboxes you could use it without [] but then it would be more like
a radio button. Or you could use it with different names in name="".