Last active
February 23, 2017 21:44
-
-
Save kparms/5e357edfdb6053b0304759af93f82f79 to your computer and use it in GitHub Desktop.
3 input boxes
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
<html> | |
<body> | |
<form action="page.php"> | |
<table> | |
<tr> | |
<td><input type="text" name="name"></td> | |
</tr> | |
<tr> | |
<td><input type="text" name="email"></td> | |
</tr> | |
<tr> | |
<td><input type="text" name="company"></td> | |
</tr> | |
<tr> | |
<td><input type="submit" value="Submit"></td> | |
</tr> | |
</table> | |
</form> | |
</body> | |
</html> |
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
<html> | |
<body> | |
<?php | |
if ($_SERVER["REQUEST_METHOD"] == "POST") { | |
echo "it's a POST<br/>"; | |
} | |
else { | |
echo "it's a GET<br/>"; | |
echo 'Hello ' . htmlspecialchars($_GET["name"]) . '! <br/><br/>'; | |
} | |
echo $_GET["name"] . "<br/>"; | |
echo $_GET["email"] . "<br/>"; | |
echo $_GET["company"] . "<br/>"; | |
?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
good example https://www.w3schools.com/php/showphp.asp?filename=demo_form_validation_escapechar