Jump to content

help with drop down


fazzfarrell

Recommended Posts

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>

</select>
</form>

The result
<?php
//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.spgrouponline.co.uk/resul...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)

Thanks
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.