note 116444 added to tutorial.forms

From: Date: Sun, 04 Jan 2015 11:14:06 +0000
Subject: note 116444 added to tutorial.forms
Groups: php.notes 
Request: Send a blank email to php-notes+get-201358@lists.php.net to get a copy of this message
@sethg at ropine dot com You're partially right. For many people, the difference between POST/GET is about whether data is sent as a URL query (GET) or as a HTTP request payload together with headers (POST) and in most cases it is used so with regards to that. In case of forms the difference between GET and POST has more to do with convenience and the fact that both methods fit to certain use cases and not with the fact whether a some resource is created/changed on the server or not (eg. login forms use POST method mainly to not expose sensitive data in URL etc.). It all depends on the back-end implementation what really happens after GET or POST request is received. GET is good if you want the request to be cacheable and/or bookmarkable. In most HTML form cases though, POST seems always better, especially when we deal with long data (eg. forum post). To be strict about HTTP verbs, POST verb usually means creation of new resource while to update an existing resource, the PUT method is used (not applicable in case of HTML forms except some additional hidden "method" form fields). Those who are not familiar with HTTP verbs shall dive into HTTP specs (RFC 2616, section "9 Method Definitions") and read a bit about REST. ---- Server IP: 72.52.91.14 Probable Submitter: 83.26.116.120 ---- Manual Page -- http://php.net/manual/en/tutorial.forms.php Edit -- https://master.php.net/note/edit/116444 Del: integrated -- https://master.php.net/note/delete/116444/integrated Del: useless -- https://master.php.net/note/delete/116444/useless Del: bad code -- https://master.php.net/note/delete/116444/bad+code Del: spam -- https://master.php.net/note/delete/116444/spam Del: non-english -- https://master.php.net/note/delete/116444/non-english Del: in docs -- https://master.php.net/note/delete/116444/in+docs Del: other reasons-- https://master.php.net/note/delete/116444 Reject -- https://master.php.net/note/reject/116444 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#201358) next »