Jump to content


help with drop down

  • Please log in to reply
No replies to this topic

#1 fazzfarrell

  • Members
  • PipPipPip
  • Advanced Member
  • 154 posts

Posted 16 October 2006 - 08:02 AM

Can any one help!

The Database:
mysql_select_db($database_jag, $jag);
$query_rsCurrency = "SELECT * FROM `currency`";
$rsCurrency = mysql_query($query_rsCurrency, $jag) or die(mysql_error());
$row_rsCurrency = mysql_fetch_assoc($rsCurrency);
$totalRows_rsCurrency = mysql_num_rows($rsCurrency);

The Drop down menu:
<form id="frmCurr" name="frmCurr" method="post">
<select name="Currency" id="Currency" OnChange="UpdateQuantity()">
<option selected="selected">GBP</option>
<option value="British Pounds">British Pounds</option>
<option value="American Dollars">American Dollars</option>
<option value="Euro">Euro</option>


The result
//Price x currency to give result
$number1 = $HTTP_SESSION_VARS["icJag"]->col("ItemSubTotal");
$number2 = $row_rsCurrency['Rate'];
$newnumber = ($number1 * $number2);
echo $english_format_number = number_format($newnumber, 2, '.', '');


What I am trying to do is:
The user selects there currency
The price is in GBP on the page, when the uaer selects the currency it calculates the result on the page with out going to another page.

The url for the page is http://gtr.spgroupon....mageField_y=10

As you can see I have a postage area option too this works fine and there are some results on the bottom right where the calculation works (as it is picking up the first option in the database)


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users