Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 481 | Replies: 1
![]() |
•
•
Join Date: Nov 2007
Posts: 35
Reputation:
Rep Power: 0
Solved Threads: 0
Thank you in advance to anyone who can answer this for me.
In a registration form of mine the user selects the state they live in with a drop-down menu.
In the 'Update' form I would like their previous choice to automatically display its selection.
For example if my profile displays "Arkansas" my update form should be already display "Arkansas" in the the select menu, but I keep getting 'None Selected'?
I know the query is complete. I can make the data display correctly using
<input type='text' name ='teamstate' value ='{$row['teamstate']}'> but can't get the select tag to work.
Any help is greatly appreciated!
//snippet of my code
In a registration form of mine the user selects the state they live in with a drop-down menu.
In the 'Update' form I would like their previous choice to automatically display its selection.
For example if my profile displays "Arkansas" my update form should be already display "Arkansas" in the the select menu, but I keep getting 'None Selected'?
I know the query is complete. I can make the data display correctly using
<input type='text' name ='teamstate' value ='{$row['teamstate']}'> but can't get the select tag to work.
Any help is greatly appreciated!
//snippet of my code
php Syntax (Toggle Plain Text)
<SELECT NAME='teamstate' SIZE='1' > selected>{$row['$teamstate']}> <OPTION VALUE =''>None selected</option> <OPTION VALUE='Alabama'>Alabama </OPTION> <OPTION VALUE='Alaska'>Alaska </OPTION> <OPTION VALUE='Arizona'>Arizona </OPTION> </SELECT>
Last edited by peter_budo : Apr 3rd, 2008 at 11:03 am. Reason: Keep It Organized - please use [code] tags
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 240
http://www.daniweb.com/forums/thread116723.html same question. See the example.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)






Linear Mode