<!Doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>converter </title>
</head>
<body>
<?php error_reporting(E_ALL^E_NOTICE)?>
<div align='Center'>
<h1>Converter</h1>
<form name="form1" action="converter.php" method="POST" >
<table >
<tr><td>Enter First Value</td><td><input type="text" name="value1" /></td></tr>
<tr><td>Source currency </td><td><select name="Source">
<option value="Euro">Euro</option>
<option value="Dollar">Dollar </option>
<option value="Rupees">Rupees </option>
</select></td>
</tr>
<tr><td>Destination currency </td><td><select name="Destination">
<option value="Euro">Euro</option>
<option value="Dollar">Dollar </option>
<option value="Rupees">Rupees </option>
</select></td>
</tr>
<tr><td colspan="2" align="Center"><input type="Submit" name="submit1" value="Calculate" /></td></tr>
<tr><font color="red"><td>Changed Value is :</td><td><?php
//echo $Value1." Total " .$Value2;
if(isset($_POST['submit1'])){
$Value1=$_POST['value1'];
$Source=$_POST['Source'];
$Destination=$_POST['Destination'];
if($Source== $Destination){
echo "Please Select Diff Choice!!";
}elseif($Source=="Dollar" && $Destination=="Rupees" ){
echo $Value1 /68;
}elseif($Source=="Rupees" && $Destination=="Dollar" ){
echo $Value1 *68;
}elseif($Source=="Euro" && $Destination=="Rupees" ){
echo $Value1 *0.011;
}elseif($Source=="Rupees" && $Destination=="Euro" ){
echo $Value1 /0.011;
}elseif($Source=="Dollar" && $Destination=="Euro" ){
echo $Value1 *0.76;
}elseif($Source=="Euro" && $Destination=="Dollar" ){
echo $Value1 /0.76;
}
//echo $Value1." Total " .$Value2 .$operation;
}
?></td></font></tr>
</table
</form>
</div>
</body>
</html>
No comments:
Post a Comment