Check boxes should not be given the same name.  Radio buttons should to
denote a grouping.  In other words, if you want to have a bunch of radio
buttons indicating a choice between items (say bananas, oranges, and
apples), you would name them the same thing and give them each a different
value.  Checkboxes need to be given unique names to identify them.  Using
the example above, you would have three check boxes one called bananas, one
called oranges and one called apples.  They are given the value of true when
they are submitted.  You could probably hard code the value as well, but I
rarely do so.

Robbert van Andel 


-----Original Message-----
From: Xin Qi [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 21, 2002 11:14 AM
To: [EMAIL PROTECTED]
Subject: [PHP] how can php get the values of a group of checkbox


hi there,

if i have a group of checkboxes, and they have the SAME name, when they are
submited into a php script, how can this php file get the value of each
checkbox?

since they have the same name, $_GET["checkbox_name"] only returns the last
one.

thanks



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


 "The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from all
computers." 


Reply via email to