Re: making a tutorial

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



George Pitcher wrote:
<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.


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="".




Surely parsing the final checkbox would overwrite any previous ones unless
they were clearly identifiable as different.

George
numerize them favourite[1],favourite[2],favourite[3]... and so on

That works!

btw print_r($GLOBALS) would you print out what you got from the Posted site with some more values.

Give it a try

Greets
	barry
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux