Unit Converter in PHP Script | Mini Project

The Unit Converter in Php script convert it into total 6 different type. Following file code will given to Make it unit converter php is mini project. Best small project but very useful unit converter download.

This convert into following types:

  1. AREA
  2. CURRENCY
  3. LENGTH Converter.
  4. TEMPERATURE
  5. VOLUME
  6. WEIGHT

Project Category:

web based Mathematical Application ( Mini Project Unit Converter in Php script ).

How to create unit convert in php Script ?

Answer is very easy you have to just copy following code to unit converter in php script. and save it together to make free unit convert php script . If you have any question related unit converter in php. You can also download Source code by clicking below link.

Contact on: “admin@project-download.com”

Please try and give us some remarks regarding the Unit Converter.

 

Requirement of Project:

Software Requirement

  • Operating System : Unix, Mac, Windows, Linux, and Other
  • Programing: PHP
  • Database : No Database.
  • Software like: Wamp, Xampp.

Hardware Requirement

  • CPU : Pentium or Above
  • RAM Usage : 256 MB
  • Disk Space : 15 MB

One of above Unit Converter in Php script ( Temp.php )

<html><head><title>Unit Converter – Temperature</title></head><body>

<form action=”temp.php” method=”POST”>

<h1 align=center><font color=blue><ins>TEMPERATURE CONVERSION</ins></font></h1>

<h1 align=”right”><font size=”3″ color=”#FF0000″><a href=”../index.html”><ins>home</ins></a></font></h1>

<table align=center>

<tr>

<td>Enter Value </td>

<td><input type=text name=val></td>

</tr>

<tr>

<td>From</td>

<td>

<select name=”from”>

<option value=0>–select–</option>

<option value=1>Celcius</option>

<option value=2>Fahrenheit</option>

<option value=3>Kelvin</option>

</select>

</td>

</tr>

</table>

<p>&&nbsp;<input type=submit value=Convert></p><?php

if(isset($_POST[‘val’]))

{

$val=$_POST[‘val’];

if(!preg_match(‘/^[0-9.-]/’,$val))

{

echo ‘<script language=”JavaScript”>’.”\n”.’alert(“Invalid input”);’.”\n”;

echo “window.location=(‘temp.php’);\n”;

echo ‘</script>’;

}

$from=$_POST[‘from’];

if($from==0)

{

echo ‘<script language=”JavaScript”>’.”\n”.’alert(“Please select a base unit”);’.”\n”;

echo ‘</script>’;

}

else

{

function assign($from,$val)

{

switch ($from)

{

case 1:

$fromu=”Celcius”;$c=1;$f=(double)(($val*9/5)+32);$k=(double)($val+273);break;

case 2:

$fromu=”Fahrenheit”;$c=(($val-32)*5/9);$f=1;$k=(double)((($val-32)*5/9)+273);break;

case 3:

$fromu=”Kelvin”;$c=(double)($val-273);$f=(double)((($val-273)*9/5)+32);$k=1;break;

}

echo “<br><br><table align=center>

<tr><td><h3> “,$val,” “,$fromu,” equivalent is </h3></td></tr>

<tr align=right><td><u> “,$c,”</u> Celcius</td></tr>

<tr align=right><td><u> “,$f,”</u> Fahrenheit</td></tr>

<tr align=right><td><u> “,$k,”</u> Kelvin</td></tr></table>”;

}

assign($from,$val);

}

}

?>

</form>

<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><h1 align=”right”><font size=”3″ color=”#FF0000″>Developed by Project-Download.com</a></font></h1>

</body></html>

Download Unit Converter in PHP Script

if you have any problem related to project and for more project you can download it from project-download.com.

Just Click on the below icon to download free mini project of unit converter in php.