Re: multiple checkbox/select problem

From: Date: Thu, 20 Jul 2000 21:11:54 +0000
Subject: Re: multiple checkbox/select problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-7478@lists.php.net to get a copy of this message
ok, i just replaced the php.ini file (which was the optimized version) with the php.ini-dist file that came w/ the source. thanks Patrick Reagan wrote: > > i have a date selection form for a user to check multiple dates an even > occurs. I have searched the web, looked at the php manual to no avail, > so i am posting it here. > > i have a series of checkboxes like this > <input type="checkbox" name="eventdate" value="7/20/2000"> > > and there are about 60 on the same page w/ the same name and different > values. > > i try getting the value by doing <? print $eventdate; ?> and it gives me > just the last one selected. > > fine, i changed the checkbox code to: > <input type="checkbox" name="eventdate[]" > value="7/20/2000"> (added the > [] after the name) > as per some documentation i had read > > now a <? print $eventdate; ?> returns a single string: "Array" > so I try <? print $eventdate[0]; ?> to hopefully get the first date. > instead, i get "A" > > weird. > this is the same for both checkboxes and multiple select. > > i am using PHP 4.0.0 on Linux 2.2.14 > any help is greatly appreciated.

« previous php.general (#7478) next »