Skip to content

Instantly share code, notes, and snippets.

@kparms
Last active February 23, 2017 21:44
Show Gist options
  • Save kparms/5e357edfdb6053b0304759af93f82f79 to your computer and use it in GitHub Desktop.
Save kparms/5e357edfdb6053b0304759af93f82f79 to your computer and use it in GitHub Desktop.
3 input boxes
<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>
<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>
@kparms
Copy link
Author

kparms commented Feb 23, 2017

@kparms
Copy link
Author

kparms commented Feb 23, 2017

I set up the pages above here: http://parmnet.com/formtest/home.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment