multiple checkbox/select problem

From: Date: Thu, 20 Jul 2000 20:07:45 +0000
Subject: multiple checkbox/select problem
Groups: php.general 
Request: Send a blank email to php-general+get-7470@lists.php.net to get a copy of this message
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 (#7470) next »