$units1 To $units2"); $unitconv="units1=".urlencode($units1). "&units2=".urlencode($units2). "&conv=".$conv; $URL="convert.php?".$unitconv; printf("
",$URL); //echo(""); echo("Enter $units1 ".N2L); $buttonvalue="Submit ".$units1; echo ("
"); if(!$quan && !(substr($units1,0,7)=="Degrees")) { echo(NL); } else if($start && substr($units1,0,7)=="Degrees") { echo(NL); } else { If($units1=="Degrees Fahrenheit") { //subtract 32 from fahrenheit for calculation purposes $quan-=32; } $result=$quan*$conv; If($units1=="Degrees Celsius") { //add 32 to celsius $result+=32; } If($units1=="Degrees Fahrenheit") { //add back the 32 to fahrenheit for display purposes $quan+=32; } echo("

".number_format($quan,2)." ".$units1." = ".number_format($result,3)." ".$units2."

".NL); } echo(""); echo(""); echo(""); $change=""; echo($change."
HomeReturn to Conversions Reverse Conversion
".NL); ?>