Hey there,
Just wondering what the best method would be to do the following:
I have a page full of user options. Some are drop down boxes, some are text boxes and some are checkboxes.
I also have a database that stores the selected options.
All of the text boxes are stored as mediumtext, and all of the drop down boxes and checkboxes tinyint.
Up until now, i have hard coded each option into my coding, like this
<option value="1">PHP Manual</option>
<option value="2">PHPBuilder.com</option>
However it is a bit of an arse when i want to add a new option to the list, as i have to change loads of coding:
a. i have to manually add another option to the checkbox to different areas of th
b. i have to change the fuction that takes the value stored in mysql and converts it to the text version that the user had selected and display the text.
When i say, add 10 items each to different drop down menus for example it can take an age to do.
Can anyone thing of a more dynamic way of doing this by storing all of the values in mysql so i can add items at the touch of a button?
It needs to be secure to prevent users from saving options locally and changing values.
I just need help with the method/database design and not coding 🙂
Thanks
Jonno