RU beehive logo ITEC dept promo banner
ITEC 325
2018spring
ibarland

GET v. POST

video: GET vs POST (11m16s)

GET & POST methods

Q: But how is information communicated from a web form (pure html) to a php program?
A: When you click 'submit', the HTML makes a page-request to the page specified by the form's "action" attribute. (Presumably it's a php page.) The page-request incudes extra information about what html input fields had been selected, etc., as part of the http request. The server gets that request and invokes the php file as normal, but it also pre-initializes an array of values for the program — and it fills that array with the extra information contained in the page-request.

When to use which?:

takeaways

video from distance lecture (breeze), 2017-feb-07 (1h42m), REVIEWING this info

1 Idempotent is not quite the same as having-no-side-effect: For example, if you add-to-shopping-cart-unless-item-already-there, you can change state, but still be idempotent.      
2 Well, “irrelevant” state-change is okay: you can update log files and update cookie-timestamps, w/o violating the spirit of a GET request.      
3 And later, when we talk about sticky-forms, I'll suggest “customer-info-edit.html” which requires either …-form or …-handle.      

logo for creative commons by-attribution license
This page licensed CC-BY 4.0 Ian Barland
Page last generated 2018.Feb.15 (Thu)
Please mail any suggestions
(incl. typos, broken links)
to ibarlandradford.edu
Rendered by Racket.