note 37899 added to tutorial.forms

From: Date: Mon, 01 Dec 2003 17:55:25 +0000
Subject: note 37899 added to tutorial.forms
Groups: php.notes 
Request: Send a blank email to php-notes+get-61227@lists.php.net to get a copy of this message
According to the HTTP specification, you should use the POST method when you're using the form to change the state of something on the server end. For example, if a page has a form to allow users to add their own comments, like this page here, the form should use POST. If you click "Reload" or "Refresh" on a page that you reached through a POST, it's almost always an error -- you shouldn't be posting the same comment twice -- which is why these pages aren't bookmarked or cached. You should use the GET method when your form is, well, getting something off the server and not actually changing anything. For example, the form for a search engine should use GET, since searching a Web site should not be changing anything that the client might care about, and bookmarking or caching the results of a search-engine query is just as useful as bookmarking or caching a static HTML page. ---- Manual Page -- http://www.php.net/manual/en/tutorial.forms.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+37899 Delete -- http://master.php.net/manage/user-notes.php?action=delete+37899&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+37899&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#61227) next »