Ver Mensaje Individual
  #2 (permalink)  
Antiguo 06/02/2009, 07:29
Avatar de rodno
rodno
 
Fecha de Ingreso: enero-2009
Ubicación: En algun lugar de Cuba
Mensajes: 426
Antigüedad: 15 años, 3 meses
Puntos: 43
De acuerdo Respuesta: Ayuda en multiplicar una variable por el valor de un input

Saludos,

Prueba esto:

Código PHP:
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form name="form1" method="post" action="x.php?m=1">
  <p>
    <input type="text" name="m1">
</p>
  <p>
    <input type="text" name="m2">
</p>
  <p>
    <input type="submit" name="Submit" value="Enviar">
</p>
  <p>&nbsp; </p>
</form>
<?php 
if ($_GET['m']==1)
{
echo 
$_POST['m1']*$_POST['m2'];
}

 
?>
</body>
</html>