rendered paste body<?phpfunction getCurrency ($cur,$ammont) { $fajl = fopen("http://currencysource.com/RSS/MTL.xml", "r"); list(,$flus) = explode("MTL = $cur (", $fajl, 2); list($flus) = explode(")", $flus, 2); $rate = $flus; echo $rate; $newcost = $ammont * $rate; if (($cur == "USD") && ( $rate > 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 { ?><form method="POST" action="<? echo $PHP_SELF; ?>" <p><select size="1" name="currency"> <option selected value="USD">American Dollars (USD)</option> <option value="EUR">Euros (EUR)</option> </select></p> <p><input type="text" name="amount" size="5"></p> <p> </p> <p><input type="submit" value="Submit" name="B1"></p></form><?}?>