Right now i changed from options table to my own table so things are getting difficult
i have a checkbox its name is selection in table, so here is what i tried
<input type="checkbox" name="selection" value="1"<?php checked("1",$item['selection']);?> />
<input type="checkbox" name="selection" value="2"<?php checked("2",$item['selection']);?> />
<input type="checkbox" name="selection" value="3"<?php checked("3",$item['selection']);?> />
This is not saving any value , Then i tried as array in below
<input type="checkbox" name="selection[]" value="1"<?php checked("1",$item['selection']);?> />
<input type="checkbox" name="selection[]" value="2"<?php checked("2",$item['selection']);?> />
<input type="checkbox" name="selection[]" value="3"<?php checked("3",$item['selection']);?> />
It is throwing warning Warning: mysql_real_escape_string() expects parameter 1 to be string, array given
How to store multiple values with the same name in checkbox when using my own table?
Any help help would be greatful.
This is not saving any valueyou mean you are not getting values checked ?