<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-get.php" METHOD="GET"> <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 GET method (name = 'inp')</title> </head> <body> <?php print "This is a PHP prog to run the request: "; print '_$GET[inp] = '; # Single quoted string: print verbatim !! print $_GET["inp"]; # This will print the received value !! ?> </body> </html> |
Try it: