Código PHP:
porcentaje de 40
= %
Código PHP:
<?php
$num1=$_GET["c"];
$total = ($num1/40)*100;
?>
</p>
<p> </p>
<table width="518" border="1" align="center">
<tr>
<td width="207"><font size="1">
<input size=10 name=c value="<?php echo $row {'calcular'} ?>">
porcentaje de 40</font></td>
<td width="127"><font size="1">
=
<input name=total value="<?php echo "$total"; ?>" size=10>
%</font></td>
<td width="99"><font size="1">
<input name="button" action="" type=submit value=Calculo>
</font></td>
<td width="57" bgcolor="<?php if($total<=45){ echo "red"; } else if($total<=75){ echo "yellow"; } else if($total<=100){ echo "green"; } else if($total>100){ echo "green"; } ?>"><?php echo $_GET[d]." " ?> </td>
</tr>
</table>