PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
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.
<?php
if (is_array($_POST['sport'])) {
foreach ($_POST['sport'] as $athletics) {
$sql = "INSERT INTO $table (athletics) VALUES ($athletics)";
}
}
?>
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.