RE: [PHP] Getting values of Checkboxes

From: Date: Tue, 19 Mar 2002 03:25:15 +0000
Subject: RE: [PHP] Getting values of Checkboxes
Groups: php.general 
Request: Send a blank email to php-general+get-89067@lists.php.net to get a copy of this message
If a heckbox is left blank, then the webserver does not pass it's name/value pair on to the PHP processor. This means that if you have <input type=checkbox name=foo> And the box is not checked, then when your script recieves the form, $_POST['foo'] will not be available. So to test for it, use isset($_POST['foo']) to see if they checked it. (the example code is for version 4.1.x) [TK] > -----Original Message----- > From: Daniel Ferreira Castro [mailto:dfcastro@ig.com.br] > Sent: Tuesday, 19 March 2002 1:27 PM > To: php-general@lists.php.net > Subject: [PHP] Getting values of Checkboxes > > > I have checkboxes on my FORM and I want to get the values of > thoses checkboxes with my PHP script. My html use the post > method I am trying to use > $HTTP_POST_FORM['name_of_the_checkbox'] but I am not beeing > successfull. How can I do it?? > > Thank you > > Daniel; F. Castro > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#89067) next »