<html>
<head>
<title>Documento sin título</title>
</head>
<body>
<form name="funcion.php" method="post" action="">
digite el primer valor<input type="text" name="uno">
<br><br>
digite el segundo valor<input type="text" name="dos">
<br> <br>
<input type="submit" name="botton" value="aceptar">
</form>
<?php
if($_REQUEST[botton] != "")
{
$r= suma($uno, $dos);
echo "$r";
}
function suma($uno, $dos)
{
$result = $uno + $dos;
return($result);
}
?>
</body>
</html>
<head>
<title>Documento sin título</title>
</head>
<body>
<form name="funcion.php" method="post" action="">
digite el primer valor<input type="text" name="uno">
<br><br>
digite el segundo valor<input type="text" name="dos">
<br> <br>
<input type="submit" name="botton" value="aceptar">
</form>
<?php
if($_REQUEST[botton] != "")
{
$r= suma($uno, $dos);
echo "$r";
}
function suma($uno, $dos)
{
$result = $uno + $dos;
return($result);
}
?>
</body>
</html>

No hay comentarios:
Publicar un comentario