Here is my problem, I have dropdown which used to save the selected option to a SQL database. Now I have an Edit option where the same dropdown is created dynamically to give the user to select and alternate option and save the edit. When the edit page launches I want the dropdown to be pre-selected the value already saved in the database.
I use following code to get done the similar thing with a textbox but strugling to put the same value attribute to the dropdown.
<input name='routename' type='text' value='".htmlentities($row['route'])."'> // This is working for the textbox
can someone tell me how to do this with a dropdown box? Thanks
It’s a little more complicated but can be achieved with this: