I have a form. Inside that a number of checkbox present. So when someone selects some checkboxes(lets say we have selected two checkboxes Disk Space, Processor) and clicks on save. Then it should save in the database like this
id attribute_name
1 Disk space
2 Processor
<form id="formID" method="post" action="" enctype="multipart/form-data">
<input type="checkbox" name="" value="Disk space"/>Disk space<br />
<input type="checkbox" name="" value="Color"/>Color<br />
<input type="checkbox" name="" value="Processor"/>Processor<br />
<input type="submit" name="save" id="save" value="save"/>
</form>
So can someone tell me how to do this? I had made my insert query like this
INSERT INTO `ia_attributes`(`attribute_id`, `attribute_name`) VALUES ('', '".$attribute_values."')";
but this one entered all the selected attributes in a single column.