update dropdown box

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mathieu
Forum Newbie
Posts: 2
Joined: Tue Aug 24, 2010 8:50 pm

update dropdown box

Post by mathieu »

Hi i have a problem with fixing a php drop down list to indicate to the user that the item has been completed. They select an item from the dropdown list and then complete a few text fields below and click submit. but when they re-open the drop down list afterwards it is impossible to see what items have been previously submitted. There is no problem with submitting the code, its just being able to see what they have previously submitted so they can keep track of what there upto. making the item in the drop down list turn to bold once it is submitted or something would be great. Ive been trying all morning. Any help would be great.
amargharat
Forum Commoner
Posts: 82
Joined: Wed Sep 16, 2009 2:43 am
Location: Mumbai, India
Contact:

Re: update dropdown box

Post by amargharat »

Refer following code,

Code: Select all

<select name="country">
<option value="india" <?php if($_POST["country"] == "india") echo "selected";?>></option>
<option value="uk" <?php if($_POST["country"] == "uk") echo "selected";?>></option>
</select>
Post Reply