Perl: Reading POST Form Actions
Guest: Patrick Delahanty
The Code for today's show is available at our: Github
Let's play with some POST!
Last week we used the "GET" method within the HTML "FORM" tag to get information from the browser.
<FORM METHOD=GET ACTION="../cgi-bin/animal_name.pl">
<h2>Would you care to name this creature?</h2><br>
* If we type "My Dog" into the field and click Submit, it will create a URL that calls the script "animal_name.pl" and passes it the value "My+Dog"
* The resulting URL would read:
Now we're going to use "POST"
* While "GET" was fine for little pieces of data entry from the user, "POST" is the prefered methos for sending longer strings and combinations of HTML FORM data.
- Unlike GET, POST requests have no restruction on data length.
POST is NOT secure, but it DOES have a few security advantages to GET
* GET requests remain in the browser history, CAN be cached and can be bookmarked.
* POST requests are NOT retained the browser history, nor are they cacheable or bookmarkable.
Get in Touch With Us!
* Subscribe and get Coding 101 automatically at TWiT.tv!
* Follow PadreSJ and Snubs on Twitter.
* Watch the show live and join the chatroom every Thursday at 1:30pm PST.
* Email us at Padre@twit.tv and Shannon@twit.tv.
* Join our Google+ Community!
*Check out our transcripts.