<html> <head> <title> HTML Form 1</title> </head> <body> <HR> <HR> <B> Form: </B> <HR> <P> <FORM ACTION="http://holland.mathcs.emory.edu/~cs377001/Web/echo-post.php" METHOD="POST"> <p>Enter input: <input type="text" name="inp" size=40></p> <p><input type="submit" value="Press to send"></p> </FORM> </body> </html> |
What the Form tag look like in a webpage:
Type some text
in the input box
Press on the
Press to send button
|
|
|
|
|
<html>
<head>
<title> PHP program using the POST method (name = 'inp')</title>
</head>
<body>
<?php
print "This is a PHP prog to run the request: ";
print '_$POST[inp] = ';
print $_POST["inp"];
?>
</body>
</html>
|
Try it: