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? Quote Link to comment 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] Quote Link to comment 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! Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.