RE: How to handle multiple value checkboxes

From: Date: Fri, 30 Aug 2002 08:55:10 +0000
Subject: RE: How to handle multiple value checkboxes
Groups: php.general 
Request: Send a blank email to php-general+get-114620@lists.php.net to get a copy of this message
name your checkboxes like so <input type="checkbox" name="mycheckbox[]" value="1"> on your result page you'll end up with an array of checked boxes. If the boxes are not checked they dont appear in the array. for quick and dirty debugging on your result page: <? print '<pre>'; print_r($_POST['mycheckbox']); // returns your checkbox array print '</pre>'; ?> hope this helps :) :: Julien COQUET EMEA hp.com Common Services Cap Gemini Ernst & Young Advanced Delivery and Integration -----Original Message----- From: Lon Lentz [mailto:lonl@eximpact.com] Sent: Thursday, August 29, 2002 11:07 PM To: Php-General@Lists. Php. Net Subject: How to handle multiple value checkboxes If I have a form with multiple checkboxes with different values but the same name, and someone selects a couple of them, how do I reference all of the values? Right now I am only getting the last one selected. __________________________ Lon Lentz Applications Developer EXImpact.com

« previous php.general (#114620) next »