I have 3 checkboxes whose values are getting stored in the database with a comma separator.
<input name="color" type="checkbox" value="red" id="red" />red
<input name="color" type="checkbox" value="blue" id="blue" />blue
<input name="color" type="checkbox" value="green" id="green" />green
values getting stored with comma separator
red, blue, green
now i want to show the checkboxes as "checked" to show the customer as which colors they chose lasttime when they submitted the form.
How can i make it possible ?
If it is possible without the comma separator then i can remove the comma.
Your storing the data incorrectly for this.
PHP: serialize - Manual
PHP: unserialize - Manual
This will allow you to store an array in the column that can be easily manipulated for what you want to do.