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 Common Services
Cap Gemini Ernst & Young
Advanced Delivery and Integration 

-----Original Message-----
From: Lon Lentz [mailto:[EMAIL PROTECTED]]
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

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to