C'est la vie.
Loading search...

Kilometer <-> Mile Converter

Kilometers <-> Miles Converter
  Miles $m2k=$_POST['amount']*1.609344; //Miles -> Kilometers if(isset($_POST['submit'])){ //Alright, if we're set to go... if($_POST['from'] == kilometers){ //If we're coming from Kilometers... if($_POST['to'] == kilometers){ //...and going to Kilometers, it's the same. echo $_POST['amount']; }elseif($_POST['to'] == miles){ //...and going to Miles, do $k2m. echo $k2m;} } if($_POST['from'] == miles){ //If we're coming from Miles... if($_POST['to'] == miles){ //...and going to Miles, it's the same. echo $_POST['amount']; }elseif($_POST['to'] == kilometers){ //...and going to Kilometers, do $m2k. echo $m2k;} } }else{ echo 'N/A';} ?>