0 ) && ( $rate >= 2 && $rate <= 4 )) { return $newcost; }; if (($cur == "EUR") && ( $rate > 0 ) && ( $rate >= 2 && $rate <= 3 )) { return $newcost; }; } if ($_POST['currency']) { $newcost = getCurrency ($_POST['currency'],$_POST['amount']); $global_variable_currency = $_POST['currency']; echo "LM" . $_POST['amount'] ." is " . $newcost . " in " . $global_variable_currency; } else { ?>