Page 1 of 1

problem with dropdown list

Posted: Mon May 17, 2010 7:23 am
by iijb
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

Re: problem with dropdown list

Posted: Mon May 17, 2010 10:17 am
by social_experiment
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"; ?>