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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to