Hi there,
I’m having a bit of a problem here. I’m trying to achieve something, but I don’t know how.
Here’s the situation:
I have a MySql database, and a custom content management system. The user can add certain items to the database through list boxes in html. Now I want to make an edit form, so the user can go back and edit some of the values he entered. No problem with textfields and all that, but I want to have the listbox again on screen, with the value that was saved in the database…
Here is what the listbox looks like:
<select name=“category” id=“category”>
<option value=“0”>Choose your item</option>
<option value=“1”>Item 1</option>
<option value=“2”>Item 2</option>
<option value=“3”>Item 3</option>
<option value=“4”>Item 4</option>
</select>
And the values (0, 1, 2, 3 or 4) are saved into the db.
So have do I set the value of the listbox to the value that was saved in the db?
Any help will be appreciated…
Sintax :mu: