Current location: Hot Scripts Forums » Programming Languages » PHP » php dropdown list validation


php dropdown list validation

Reply
  #1 (permalink)  
Old 12-07-05, 09:08 AM
eddo32 eddo32 is offline
Newbie Coder
 
Join Date: Apr 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Question php dropdown list validation

I have a dropdown list full of states that I read from an array into the list.

<?

while (list($abbrev, $name)=each($states)) {
printf("<option %s value=\"%s\">%s</option>\n", ($state) ? 'selected="selected"' : '', $abbrev, $name);
}

?>

My question is that when I select a state and submit my form, all of my options are selected, and the list display's only the last option, not the actually selected option. If anyone has any ideas or suggestions, they would be greatly appreciated!
Reply With Quote
  #2 (permalink)  
Old 12-07-05, 09:24 AM
eddo32 eddo32 is offline
Newbie Coder
 
Join Date: Apr 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
nevermind, i found my error
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP multi-dimensional array sorting issue aqw PHP 2 06-24-05 11:09 PM
server side validation using php jaishalg PHP 3 03-06-05 05:55 AM
PHP Drop down list Using Oracle RatherSurf PHP 2 02-23-05 01:18 PM
Can I populate a dropdown list???? zorrox02 JavaScript 4 10-01-04 04:03 AM
Create List with PHP ...? demnos PHP 6 08-13-04 02:40 PM


All times are GMT -5. The time now is 06:22 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.