I cant seem to find or figure out a working solution to insert multiple checkbox values from a form into a table. The closes I have come is inserting the value of merely one
You need to declare the array in the HTML via
Also you can insert multiple items with one query like this
$query = "INSERT INTO example (orange) VALUES ";
for ($i=0; $i
Also keep in mind that mysql_*
functions are officially deprecated and hence should not be used in new code. You can use PDO or MySQLi instead. See this answer on SO for more information.