Jump to content

Recommended Posts

Posted

<html>

<body>

Soma</br><br>

<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">

primeiro valor: <input type="text" name="valor1"></br><br>

segundo valor: <input type="text" name="valor2"></br><br>

<input type="submit" value="calcular">

</form>

<?php

$valor1=$_POST["valor1"];

$valor2=$_POST["valor2"];

$soma=$valor1+$valor2;

echo "O valor da soma é ".$soma;

?>

</body>

</html>

está declarado como uma função php?

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.