ayok Posted February 24, 2008 Share Posted February 24, 2008 Hi, I make a jump menu with the options based on mysql database. The jump menu is working, however, when it gets to the selected page, the "selected" option is back to the first page. This is my try: $payment = mysql_query("select * from payment") or die(mysql_error()); echo"<select name=\"pay\" onchange=\"MM_jumpMenu('parent',this,0)\"> <option value=''>Select method</option>"; $amount = $_GET['pay']; while($pay = mysql_fetch_array($payment)){ echo "<option value=cart.php?pay=$pay[pay_id]"; if(!(strcmp("cart.php?pay=$pay[pay_id]",$_GET['pay']))){ echo "selected"; } echo ">$pay[type]</option>"; } echo "</select> So everytime it jumps to the other pages, the selection always back to "Select method" option. What should I do to make the selection stay in each option selected? Thank you, ayok 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.