Retrieving from Database and show checkboxes

I was working on a project and i had landed in an awkward situation, where i have to save the tick box values in a database and once done, i had to retrieve those values and present it to the user for editing.so i create the solution yourself.

For example when there are checkboxes for 5 colors – Red, Green, Blue, Yellow, Brown and i have the php script doing insertion into database.

http://corpocrat.com/2009/05/24/how-to-store-and-retreive-checkbox-value-in-mysql-with-php/