I am having some difficulty getting a list of check boxes to work properly. I have dug through the list archives, usenet, PHP Manuals, etc. and still I am unable to process multiple checkboxes from a form submission properly. The following is what I am running into.

Form:
<input name="add" type="checkbox" id="add[]" value="179">
<input name="add" type="checkbox" id="add[]" value="409">
<input name="add" type="checkbox" id="add[]" value="2090">

PHP:
for ($i = 0; $i < count($_POST['add']); $i++)
{
        echo $_POST['add'][$i];
        echo "<br>\n";
}

Output:
2
0

Any assistance will be greatly appreciated. Thanks in advance.

Shad


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



Reply via email to