Storing form array data to MySQL using PHP
Let's say you've got a form with check boxes like below:
<form method="post" action="path to script">
<input type="checkbox" id="colors[]" value="red" /> Red
<input type="checkbox" id="colors[]" value="blue" /> Blue
<input type="checkbox" id="colors[]" value="green" /> Green
<input type="checkbox" id="colors[]" value="yellow" /> Yellow
</form>
How can I save this data into mySQL and how can I view these data from DB?
|