Hi all
In an Edit Profile Form I have to show all the options in a dropdown list with the current selected value from database as the default value. I got the value as current selected value but the problem is that the value is repeated twice in the option list. How to solve this.
Plz help
iijb
problem with dropdown list
Moderator: General Moderators
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: problem with dropdown list
You could select all the values that are not like the current one
Code: Select all
<?php $query = "SELECT field FROM table WHERE field != current_value"; ?>“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering