Ver Mensaje Individual
  #7 (permalink)  
Antiguo 03/11/2009, 11:11
Avatar de dcreate
dcreate
 
Fecha de Ingreso: octubre-2009
Ubicación: Veracruz
Mensajes: 536
Antigüedad: 14 años, 6 meses
Puntos: 22
Respuesta: Casillas que calculan resultados

a una caja de texto entonces podria ser

Cita:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<?php
if(empty($_POST['submit']))
{?>
<form id="form1" name="form1" method="post" action="mostrar_lista.php">
<label></label>
<label>comensale
<input type="text" name="textfield" />
</label>
<p>
<label></label>
</p>
<p>
<label>
<input type="submit" name="Submit" value="Enviar" />
</label>
</p>
</form>
<?php }else{
$comen1=$_POST['textfield'];

if(isset($_POST['textfield'];))
{
$aux=$total*$comen1;
}

else
{
$aux=$total;
}
echo '<input type="text" name="total" value="'.$aux.'">';
}?>
</body>
</html>