hello all,
my goal has been to insert data into
mysql using a form with checkboxes:
Here's my basic form:
<form action="POST" METHOD="insertdata.php">
<INPUT type=checkbox name="choice[]" value="one">One
<INPUT type=checkbox name="choice[]" value="two">Two
<INPUT type=checkbox name="choice[]" value="three">Three
<INPUT type=checkbox name="choice[]" value="four">Four
<INPUT type=submit name=submit value="Submit">
Here is basic table for info"
$sql = Insert into tbl_name (choice1,choice2, choice3, choice4) VALUES (...
you get the picture. so, I have tried counting array and using foreach but, I am unable to resolve this problem. any help would be great. thanks.
🙂