Can anyone help me sort out this code below to produce a drop down box that makes it possible to convert between currency's? Am I right in saying that I need an array to hold exchange rates? Any help would be appreciated.
?> with a total cost of <strong>
<form>
<select name="currency">
<option value="GBP">GBP
<option value="USD">USD
<option value="EUR">EUR
</select>
</form>
<?php
$mini_cart = no_check_summary();
$total = 0.00;
for($i = 0, $limit=count($mini_cart); $i < $limit; $i++)
{
$total +=$mini_cart[$i]['subtotal'];
}
echo sprintf("£%.2f",$total)."\n";
if(isset($_POST['currency']) && in_array($_POST['currency'], array_keys($currency_table)))
$conversion_factor = $currency_table[$_POST['currency']];
else
$conversion_factor = 1; //For GBP
?></strong>