the value will be what ever you set the value to be in your html tag. <intput type="checkbox" name="color" value="red"> if checked $_POST['color'] will equal "red". if unchecked, the index 'color' will not be in the $_POST array.
hth Jeff "Hutchins, Richard" <[EMAIL PROTECTED] To: [EMAIL PROTECTED] ngeusa.com> cc: Subject: RE: [PHP-DB] 2 problems 09/08/2003 08:30 AM Not really sure of the second part of your question, but, if I remember correctly, check boxes only appear in the POST vars if they're checked. And I'm pretty sure their values are ON. So, if you have a color checkbox named "red" and tha user checks it, it should show up as $_POST['color'] = ON. If the checkbox is not checked, you won't see it in the POST vars at all. > -----Original Message----- > From: Balaji H. Kasal [mailto:[EMAIL PROTECTED] > Sent: Monday, September 08, 2003 8:24 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] 2 problems > > > > Hi, > > I am facing 2 problems while using PHP along with form based > HTML file. > It takes inputs from the user and updates the DB. > > Problems, > 1) Not able to grab and store the checkbox status. > 2) Not able to check the correctness of entered interger > value. I realized > that form always submits (POST) the value as text. > > Thanks in advance! > > -- > Regards, > --Balaji > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php