Jump to content


Photo

drop down menus...


  • Please log in to reply
3 replies to this topic

#1 Synergic

Synergic
  • Members
  • PipPip
  • Member
  • 21 posts

Posted 07 October 2006 - 12:04 PM

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?

#2 alpine

alpine
  • Members
  • PipPipPip
  • Advanced Member
  • 756 posts
  • LocationNorway

Posted 07 October 2006 - 12:23 PM

You get the idea from this:

<?php

while($run_query_whatever)
{
if($_GET['selected'] == $this_value) $selected = "selected = \"selected\"";

echo <<<_HTML
<select name="name" value="$this_value" $selected>$this_name</select>
_HTML;
}

?>


#3 printf

printf
  • Staff Alumni
  • Advanced Member
  • 889 posts

Posted 07 October 2006 - 12:26 PM

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!

#4 Synergic

Synergic
  • Members
  • PipPip
  • Member
  • 21 posts

Posted 07 October 2006 - 01:58 PM

thanks alpine,
i figured it out from your code.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users