Synergic Posted October 7, 2006 Share Posted October 7, 2006 I have a drop down menu, i also have a value so when the form is loaded i want to select the drop down menu item based on the string. I tried all combinations and i just can't get it to auto select the drop down menu item based on the string (they're EXACTLY the same) any ideas? Link to comment https://forums.phpfreaks.com/topic/23264-drop-down-menus/ Share on other sites More sharing options...
alpine Posted October 7, 2006 Share Posted October 7, 2006 You get the idea from this:[code]<?phpwhile($run_query_whatever){if($_GET['selected'] == $this_value) $selected = "selected = \"selected\"";echo <<<_HTML<select name="name" value="$this_value" $selected>$this_name</select>_HTML;}?>[/code] Link to comment https://forums.phpfreaks.com/topic/23264-drop-down-menus/#findComment-105468 Share on other sites More sharing options...
printf Posted October 7, 2006 Share Posted October 7, 2006 Plese show your code, if it's not working then something isn't right, none of us can help you unless you help us help you. I mean we could play the guessing game, but that will not fix your problem in the shortest amount of time!me! Link to comment https://forums.phpfreaks.com/topic/23264-drop-down-menus/#findComment-105470 Share on other sites More sharing options...
Synergic Posted October 7, 2006 Author Share Posted October 7, 2006 thanks alpine,i figured it out from your code. Link to comment https://forums.phpfreaks.com/topic/23264-drop-down-menus/#findComment-105487 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.