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
At 20:14 21.11.2002, Xin Qi said:
[snip]
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
user name=cb[] and PHP will automatically make the array. then call it
with $_GET[cb][#]
Adam
On Thu, 21 Nov 2002, Xin Qi wrote:
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
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
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
; [EMAIL PROTECTED]
Subject: Re: [PHP] how can php get the values of a group of checkbox
RE: [PHP] how can php get the values of a group of checkboxthank you, but
what if all the checkboxes are generated dynamicly? I mean, I do not know
how many checkboxes where will be until the php script
]
Sent: Thursday, November 21, 2002 7:18 PM
Subject: RE: [PHP] how can php get the values of a group of checkbox
Use an array (checkbox[1], checkbox[2]). Then use a loop to pull get the data after
posting. If you expect only one choice, use a radio button.
Robbert van Andel
On Friday 22 November 2002 08:35, Xin Qi wrote:
RE: [PHP] how can php get the values of a group of checkboxbut the question
is how to determine the times of loop? the upper bound is hard to find. and
the loop does cost time though it is not so much.
If you have made the checkbox values into
8 matches
Mail list logo