best way to populate 'select' box options on forms?
Posted: Thu Nov 23, 2006 6:06 am
Hi guys.
I have a series of select boxes on a form. I am currently generating the values to be shown in the select box by assigning an array with the values to a variable in the php script and then using that variable for the 'options' of the select. Is this the best way to do this? I could also create a database table with the options in and query the database everytime the script is ran. I'm thinking this is less efficient though?
I also want users to be able to add new options to the select box too so I need to considetr which method makes this easier.
thanks for any help
Anthony
I have a series of select boxes on a form. I am currently generating the values to be shown in the select box by assigning an array with the values to a variable in the php script and then using that variable for the 'options' of the select. Is this the best way to do this? I could also create a database table with the options in and query the database everytime the script is ran. I'm thinking this is less efficient though?
I also want users to be able to add new options to the select box too so I need to considetr which method makes this easier.
thanks for any help
Anthony