lilywong Posted July 26, 2006 Share Posted July 26, 2006 I have a set of checkbox as below* Soft Drink* Cold Drink* Mineral Water* None<code><input type="checkbox" name="chkFolder1" value="001">Soft Drink<input type="checkbox" name="chkFolder2" value="002">Cold Drink<input type="checkbox" name="chkFolder3" value="003">Mineral Water<input type="checkbox" name="chkFolder4" value="004">None</code>User allow to select multiple choice from the set of checkbox, for eg, user select soft drink and mineral water, these 2 items will be saved into a database, as (001,003) in a same field called choice.when i retrive from database, how should i separate the data from choice so that soft drink and mineral water is checked when i retrive the data?thanks Quote Link to comment Share on other sites More sharing options...
bltesar Posted July 27, 2006 Share Posted July 27, 2006 More information is really needed to answer this question. To make checkboxes checked, just add 'checked' at the end of the checkbox tags, e.g.<input type="checkbox" name="chkFolder1" value="001" checked>Soft Drink<input type="checkbox" name="chkFolder2" value="002">Cold Drink<input type="checkbox" name="chkFolder3" value="003" checked>Mineral Water<input type="checkbox" name="chkFolder4" value="004">NoneThis can be achieved in a variety of ways from the database. Quote Link to comment Share on other sites More sharing options...
Annady17 Posted May 25, 2009 Share Posted May 25, 2009 [quote author=lilywong link=topic=101887.msg403657#msg403657 date=1153895884]I have a set of checkbox as below* Soft Drink* Cold Drink* Mineral Water* None<code><input type="checkbox" name="chkFolder1" value="001">Soft Drink<input type="checkbox" name="chkFolder2" value="002">Cold Drink<input type="checkbox" name="chkFolder3" value="003">Mineral Water<input type="checkbox" name="chkFolder4" value="004">None</code>User allow to select multiple choice from the set of checkbox, for eg, user select soft drink and mineral water, these 2 items will be saved into a database, as (001,003) in a same field called choice.when i retrive from database, how should i separate the data from choice so that soft drink and mineral water is checked when i retrive the data?thanks[/quote]I just wanna say thank you for posting this checkbox.. Hoping that this will not be the last post that I could be read written by you._________________[url=http://www.ep-filters.com/]Cuno Filters[/url] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.