Tema: PHP general
Ver Mensaje Individual
  #3 (permalink)  
Antiguo 12/06/2006, 16:26
Avatar de pato_volador
pato_volador
 
Fecha de Ingreso: octubre-2005
Ubicación: Planeta tierra
Mensajes: 254
Antigüedad: 18 años, 6 meses
Puntos: 0
Hola, aqui esta el script, analizalo y me dices... no lo explico por q soy medio tonto para eso... pero espero q tre sirva.. saludos

Código PHP:
<?php
if (isset($_POST['enviado'])&&$_POST['enviado']=='SI')
{
$total=$_POST['x']*$_POST['y'];
}
?>

<!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>
<form id="form1" name="form1" method="post" action="">
  <p>
    <input name="x" type="text" id="x" value="10" />
  </p>
  <p>
    <input name="y" type="text" id="y" value="56" />
  </p>
  <p>
    <input name="z" type="text" id="z" value="<?php if (isset($total)) { echo $total; } else { echo '0'; } ?>" />
</p>
  <p>
    <input type="submit" name="Submit" value="Enviar" />
    <input name="enviado" type="hidden" id="enviado" value="SI" />
  </p>
</form>
</body>
</html>
__________________
De todas las cosas que queria ser... :-D acabe siendo un pato volador... :risa:
http://patovolador.wordpress.com