If you put square brackets after the name (e.g. var[]) your form should produce an array called $_POST["var"] that comprises the checked boxes only. e.g. <form method="post" ...> <input type="checkbox" name="var[]" value="value1"> <input type="checkbox" name="var[]" value="value2"> <input type="checkbox" name="var[]" value="value3"> Regards Alberto Brea [EMAIL PROTECTED]
-----Original Message----- From: "Aris Santillan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Date: Wed, 30 Jun 2004 15:56:35 +0800 Subject: [PHP] checkbox > how can process only items with checked check-box? > > ----------- html ------------------- > > > > <html> > <head> > <title>Untitled Document</title> > </head> > > <body> > <form name="form1" method="post" action=""> > <p> > <input type="checkbox" name="checkbox" value="checkbox"> > <input type="text" name="textfield[1]"> > </p> > <p> > <input type="checkbox" name="checkbox" value="checkbox"> > <input type="text" name="textfield[2]"> > </p> > <p> > <input type="checkbox" name="checkbox" value="checkbox"> > <input type="text" name="textfield[3]"> > </p> > <p> > <input type="checkbox" name="checkbox" value="checkbox"> > <input type="text" name="textfield[4]"> > </p> > <p> > <input type="checkbox" name="checkbox" value="checkbox"> > <input type="text" name="textfield[5]"> > </p> > </form> > </body> > </html> > > > > ----------- html ------------------- > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php