Web Analytics Made Easy -
StatCounter help with drop down - CodingForum


No announcement yet.

help with drop down

  • Filter
  • Time
  • Show
Clear All
new posts

  • help with drop down

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


  • #2
    you want to check for help in the javascript forums if you don't want to have a page reload.