hello, i have a script which updates a database. The only issue i have is that one of the variables , category, is set using the <input> tag, when i go to edit the value for category i can select a new option but the next time i go to edit the category it will automatically change back to the first <option> item on the list. How can i get the <option> to remain the same value as to the one in the database until i change it. Confussed? , its a tough one to explain i think
This is the code i am using at the moment:
[code=php]<Select name=”category” class=”box” id=”category” value=”<?=$category;?>”>
<option value=”Music”>Music</option>
<option value=”Waterford”>Waterford</option><option value=”Irish”>Irish</option></Select>
If i select irish and save, and then go to this page again the value will change back to music as it is the first one on the list. How can i bring up the chosen value until i edit it?
Thanks