Re: HTML Checkboxes and PHP variables

From: Date: Wed, 29 May 2002 13:12:25 +0000
Subject: Re: HTML Checkboxes and PHP variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-99705@lists.php.net to get a copy of this message
If you name the form elements as arrays, then yeah, they are pretty much the same. <input type=checkbox name=foo[] value=one>One <input type=checkbox name=foo[] value=two>Two <input type=checkbox name=foo[] value=three>Three When submitted, $foo will be an array containing the values that were checked. If a box was not checked, it won't have any value in the array. i.e. If you check One and Three, then you'll have a $foo array like this: $foo[0]='one'; $foo[1]='three'; ---John Holmes... ----- Original Message ----- From: "Brad Harriger" <bradharriger@clarionhospital.org> To: <php-general@lists.php.net> Sent: Wednesday, May 29, 2002 8:56 AM Subject: [PHP] HTML Checkboxes and PHP variables > Are HTML Checkbox values handled the same way as Select Multiple tags? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#99705) next »