Hello,I am starting PHP.So please help me.This code for a simple convertor in php just convert Dollar to local currency.here my Elseif not correctly working.here is code:
<html>
<head>
<title>currency Convert</title>
</head>
<body>
<form action="" method="POST">
<table>
<tr>
<td>
<lebel>$</label>
<input type="text" name="amount"/>
to <select name="form">
<option value="taka">taka</option>
<option value="rupe">rupe</option>
<option value="inr">inr</option>
</select>
<input type="submit" value="convert"/>
</td>
</tr></form>
<tr>
<td>
<?php
$amount=$_POST['amount'];
if($amount>0){
$currency = $amount*80;
echo "you converted Amount $".$amount. " = ".$currency."Tk";
}
elseif($amount>0){
$currency = $amount*20;
echo "you converted ammount $".$convert. " = ".$currency."Rup";
}
elseif($amount>0){
$currency = $amount*10;
echo "you converted ammount $".$convert. " = ".$currency."Inr";
}
else
echo 'enter your ammount';
?>
</td>
</tr>
</table>
</body>
</html>