Created
August 14, 2017 00:48
-
-
Save phpfiddle/873cc925eb590e783d9a32ed5abb2dc3 to your computer and use it in GitHub Desktop.
[ Posted by Harmeet ] currency converter try
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<form> | |
<input type="text" name="currency" method="post"> | |
<select name='cur1'> | |
<option value="can">Candian Dollor(AUD)</option> | |
<option value="USD" selected>US Dollar(USD)</option> | |
<option value="inr" selected>indian rupee</option> | |
</select> | |
<?php | |
if(isset($_GET['btn'])) | |
{ | |
$amount=$_GET['currency']; | |
if($ammount) | |
{echo "enter value";} | |
else{ | |
$cur1=$_GET['cur1']; | |
if($cur1=="can" ){ | |
echo "<center><b>Your Converted Amount is:</b><br></center>"; | |
echo "<center>" . $amount*50 . "</center>"; | |
}elseif($cur1=="USD" ){ | |
echo "<center><b>Your Converted Amount is:</b><br></center>"; | |
echo "<center>" . $amount*60 . "</center>"; | |
}ELSEif($cur1=="inr" ){ | |
echo "<center><b>Your Converted Amount is:</b><br></center>"; | |
echo "<center>" . $amount*70 . "</center>"; | |
} | |
} | |
} | |
?> | |
<input type="submit" name="btn" value="convert"> | |
<input type="reset" name="reset" value="reset"> | |
</form> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment