'update' select menu

Reply

Join Date: Nov 2007
Posts: 53
Reputation: dottomm is an unknown quantity at this point 
Solved Threads: 0
dottomm dottomm is offline Offline
Junior Poster in Training

'update' select menu

 
0
  #1
Apr 2nd, 2008
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

  1. <SELECT NAME='teamstate' SIZE='1' > selected>{$row['$teamstate']}>
  2. <OPTION VALUE =''>None selected</option>
  3. <OPTION VALUE='Alabama'>Alabama
  4. </OPTION>
  5. <OPTION VALUE='Alaska'>Alaska
  6. </OPTION>
  7. <OPTION VALUE='Arizona'>Arizona
  8. </OPTION>
  9. </SELECT>
Last edited by peter_budo; Apr 3rd, 2008 at 11:03 am. Reason: Keep It Organized - please use [code] tags
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,760
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 332
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: 'update' select menu

 
0
  #2
Apr 2nd, 2008
http://www.daniweb.com/forums/thread116723.html same question. See the example.
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC