I have three check box and three input field something like this,
<input type="checkbox" name="fruit" value="orange" >
<input type="text" name="orange" >Orange
<input type="checkbox" name="fruit" value="apple" >
<input type="text" name="n" >Apple<br/>
<input type="checkbox" name="fruit" value="mango" >
<input type="text" name="mango" >Mango
I have a mysql table named fruits with four column named id, apple, orange, mango. I want to do something like if user select orange , apple , mango (checkboxes) I want to insert data into orange , apple , mango in the table from the three input field , or if user select two user check box it will just insert data into two columns from the input field's value, or if just one check box is selected then insert into one column! what is the standard procedure to do that? Thanks in advance