checkbox array and inserting into db
Posted: Sun Jul 25, 2004 7:33 pm
Sup all,
i was wondering if someone could help me out with these checkboxes. I followed the tutorials and things on other sites. Understood it a bit better from this site
, but still cant seem to get it to work right.
now i have another $sql above this for all the other database info. That all submits just not the athletics checkboxes. If i replace the $sql statement and put echo "$athletics<br>\n"; that will list the checkbox arrays.
What am i doin wrong
any help is appreciated
thanks
incyte
?>
i was wondering if someone could help me out with these checkboxes. I followed the tutorials and things on other sites. Understood it a bit better from this site
Code: Select all
<?php
if (is_array($_POST['sport'])) {
foreach ($_POST['sport'] as $athletics) {
$sql = "INSERT INTO $table (athletics) VALUES ($athletics)";
}
}
?>What am i doin wrong
any help is appreciated
thanks
incyte
?>