[insert_php]
session_start();
$shname=0;$thname=0;$ahname=0;$result=0;$sunit=0;$aunit=0;$static_val=0.26;
if(isset($_POST[“Calculate”]))
{
$sunit=$_POST[“sunit”]; $aunit=$_POST[“aunit”];
$shname=$_POST[“shname”];
$thname=$_POST[“thname”];
if($sunit === “in”){
if($thname < 0){echo "wrong value";} else{ $result = ($static_val * $ahname * $shname) / $thname;} } else{ if($thname < 0){echo "wrong value";} else{ $result = ($static_val * $ahname * $shname) / $thname;} } } unset($_POST["submit"]); [/insert_php]