This is my form: I want to calculate Units Billed when user enter present and previous reading before submission.
<form action="EIMS_North_Inserted.php" method="post">
<table class="mytable" align="center">
<tr>
<td><label>Site ID
<span class="small">Example N-WAH-8620</span>
</label></td>
<td>
<input type="text" name="a" id="course" value="" class="input"/> </td>
<td>
<label>Previous Reading
<span class="small">Regular bills</span>
</label></td>
<td>
<input type="text" name="e" id="e" value="<?php echo $e; ?>" class="input"/> </td>
<td><label>Present Reading
<span class="small">Regular bills</span>
</label></td>
<td>
<input type="text" name="f" id="f" value="" class="input"/> </td></tr>
<tr>
<td><label>Units Billed
<span class="small">Regular bills</span>
</label></td>
<td>
<input type="text" name="g" id="g" value="" class="input"/> </td>
<tr>
<td colspan="2">
<input type="submit" name="submit" style="width: 200px;
height: 20px;
cursor: pointer;
border: none;
margin-left:100px;
background: transparent url(/images/sims_update_button.jpg) no-repeat 0 0;" value=""/>
</td>
</tr>
</form>
</table>