Created
May 22, 2020 20:42
-
-
Save marcobraghim/c69be64fd7a00caafd6caabe0333eedb to your computer and use it in GitHub Desktop.
This file contains 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
<html> | |
<head> | |
<title> | |
Página Teste | |
</title> | |
</head> | |
<body> | |
<div align="center"> | |
<br><h1><b>Esta página será utilizada somente como teste!</b></h1> | |
<br> | |
<h3><p> Testando Minha Primeira Lógica </h3></p> | |
<p> Insira no campo abaixo a resposta a pergunta:<br> | |
<b><i>O que estamos Estudando?</i></b></p> | |
<form method="POST" action=""> | |
<input type="text" name="resposta" size="20"> | |
<input type="submit" value="Testar"> | |
</form> | |
<?php | |
if ($_POST["resposta"]=="") { | |
echo "O campo de resposta não pode ficar em branco!"; | |
} else { | |
echo "<h3><p>Sua resposta foi:</p></h3>"; | |
} | |
echo $_POST["resposta"]; | |
?> | |
<?php | |
$texto1=("<p><h3>Parabéns, você acaba de concluir seu primeiro script em Php!</h3></p>"); | |
$texto2=("<p><h3>Sua resposta está incorreta, tente novamente!</h3></p>"); | |
if ($_POST["resposta"]=="Php" or $_POST["resposta"]=="php" or $_POST["resposta"]=="Programação" or $_POST["resposta"]=="programação" or $_POST["resposta"]=="Programaçao" or $_POST["resposta"]=="Programacao" or $_POST["resposta"]=="programaçao" or $_POST["resposta"]=="programacao") { | |
echo $texto1; | |
} else { | |
echo $texto2; | |
} | |
?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment