Jump to content

Jump menu problem


ayok

Recommended Posts

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.