Hello all,
I have a problem that I am not sure how to approach. I am designing an admin tool for real estate. Basically the tool is simply a form to enter data and store in in the database. Each variable value is stored in a session.The features of a property are chosen by selecting various checkboxes.
A small sample of the checkboxes are below:
<input name="Features1Field[]" type="checkbox" id="Features1Field[]" value="C01">
Community laundry facilities<br>
<input name="Features1Field[]" type="checkbox" id="Features1Field[]" value="C03">
Community boat facilities<br>
Notice that each value is a three digit 'code'. In the DB these three digit codes are a grouped as one long sting.
I have a 'confirm' page that displays the values that are stored in the session. This gives the user an oppertunity to view what they have and go to another page to make changes.
There is my problem. I want to be able to have this 'make changes' page to automatically fill in the values that are in the session. It was vary easy to accomplish with textboxes and pull downs....but I dont know the best approach for the checkboxes.
Remember, the session is storing the value for Features1Field[] as a string of characters ie: C03C01C07C09
How can I take this string and automatically check the boxes that should be checked?