I'm trying to get the values from a form post with multiple checkboxes checked . Here is what I have,

if ($row = mysql_fetch_array($result));

do {
<input type=checkbox name=class_id[] value=$row[class_id]> $row[name]
 }while ($row = mysql_fetch_array($result));

and when submitted

if ($class_id) {
foreach($class_id as $varName)
print "Variable: $varName\n";

All I get from this is Invalid argument supplied for foreach(). From what I could find doing a google search was to create an array using class_id[] and the above foreach().

Thanks in advance for any help!

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

Reply via email to