Created
December 2, 2014 22:41
-
-
Save bytefade/eec8a52354eaaed9a2c9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="pt"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> | |
<label for="valor">Qual o valor senhor?</label> | |
<input id="valor" type="text" name="valor"> | |
</form> | |
<?php | |
if ($_SERVER['REQUEST_METHOD']=='POST') { | |
// preciso pegar o valor do form | |
$valor = sqrt($_POST['valor']); | |
?> | |
O valor da raiz quadrada para o valor: <?php echo $_POST['valor'] ?> é: <?php echo $valor; ?> | |
<?php } ?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment