I am developing a humidity calculator in php for my own use so I'm not concerned with validation or security. Here is the HTML:
Code: Select all
<body>
<form id="form1" name="form1" method="post" action="rh.php">
<label>
<input type="text" name="db" />
Dry Bulb Temp(Celsius)</label>
<p>
<label>
<input type="text" name="wb" />
Wet Bulb Temp(Celsius)</label>
</p>
<p>
<label>
<input type="text" name="pr" />
Ambient Pressure(Millibars)</label>
</p>
<p>
<label>
<input type="submit" name="Submit" value="Calculate" />
</label>
</p>
</form>Code: Select all
<?php
$db = $_POST["db"];
$wb = $_POST["wb"];
$pr = $_POST["pr"]
$F = pow((6.112*2.178),((17.67*$wb)/($wb+243.5)));
$G = round($F,3);
echo $G;
?>Thanks,
Paul