Get vs. Post

get: form information sent from browser to server as part of query string, visible in the URL
post: form information sent from browser to server as part of HTTP body; not in URL
Example 3.2 - Simple for using 'get' - Example 3.2 |
<form method="get" action="http://cscie12.dce.harvard.edu/echo">
Email Address:
<input type="text" name="email"/><br/>
<input type="submit"/>
</form>
Email Address:
 
Example 3.3 - Simple form using 'post' - Example 3.3 |
<form method="post" action="http://cscie12.dce.harvard.edu/echo">
Email Address:
<input type="text" name="email"/><br/>
<input type="submit"/>
</form>
Email Address:
 

Copyright © David Heitmeyer