faqts : Computers : Programming : Languages : PHP : Common Problems : Forms and User Input

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

80 of 101 people (79%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

If I have multiple checkboxes checked (with the same name, but different values), why don't I get them as an array?

Apr 20th, 2001 09:38
Mike Boucher, Erik van Loenen,


If you do use name="mychkbx" for all the checkboxes it will only 
pass the last box checked to the script.
use instead, name="mychkbx[]", to pass multiple check box values 
as an array.