Una compañía de seguros tiene contratados a n vendedores. Cada uno hace tres ventas a la semana. Su política de pagos es que un vendedor recibe un sueldo base, y un 10% extra por comisiones de sus ventas. El gerente de su compañía desea saber cuanto dinero obtendrá en la semana cada vendedor por concepto de comisiones por las tres ventas realizadas, y cuanto tomando en cuenta su sueldo base y sus comisiones.
HACERLO CON HACER-MIENTRAS
tengo este codigo
Código PHP:
Ver original
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Compañía de Seguros</title> </head> <body bgcolor="#e8eff1"> <font face="Tw Cen MT"> <form name="Seguros" action="WHI_Seguros.php" method="POST"> Vendedores: <input type="text" name="vendedores" size="10"> <input type="submit" value="Calcular"> </form> <?php $i=1; $vendedores=$_POST{'vendedores'}; while($i<=$vendedores){ ?> <form name="datos" action="WHI_Seguros.php" method="POST"> <BR><BR> VENDEDORES <BR> venta 1: <input type="text" name="venta1" size="10"><br> venta 2: <input type="text" name="venta2" size="10"><br> Venta 3: <input type="text" name="venta3" size="10"><br><br> Sueldo Base: <input type="text" name="salario" size="10"> </form> <?php $venta1=$_POST{'venta1'}; $venta2=$_POST{'venta2'}; $venta3=$_POST{'venta3'}; $salario=$_POST{'salario'}; $c=($venta1+$venta2+$venta3)*0.10; $tp=$salario+$c; echo"NO se: ".$c."<br>"; echo" no tengo idea".$tp."<br>"; $i=$i+1; } } } ?> </font> </body> </html>
Ayudenme porfavor!!!!!!!!!!!!!!!!!!!