|
Posted by Curtis on 01/30/07 01:10
On Jan 28, 10:51 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> Tony Marston wrote:
> > "Jerry Stuckle" <jstuck...@attglobal.net> wrote in message
> >news:wfKdnTa_dtSiNSHYnZ2dnUVZ_vXinZ2d@comcast.com...
> >> Tony Marston wrote:
> >>> "Paul Lautman" <paul.laut...@btinternet.com> wrote in message
> >>>news:51v4v1F1k55ftU1@mid.individual.net...
> >>>> Tony Marston wrote:
>
> >>>>> You will always use $_POST when sending
> >>>>> data from the client to the server,
> >>>> Except when you use $_GET or $_REQUEST
> >>> Wrong. $_GET is used to request data FROM the server, while $_POST is
> >>> used to send data TO the server.
>
> >> No, Tony. $_GET is used to fetch information from the query string. This
> >> can be from several sources - including <form action=get...>. But $_GET
> >> is always used on the server, and the data always comes from the browser.
>
> > I disagree. The GET method is used to fetch data from the server and send it
> > to the client. The POST method is use to send data from the client to the
> > server. The GET method is bookmark-able, whereas the POST method is not.
> > This is the correct way as it is not good practice to bookmark a URL which
> > updates the server.
>
> I know you disagree, Tony. It's just another example of your
> stoopidity. Not understanding what's going on.
>
> Even though I know it's hopeless, here's an attempt to educate you.
>
> GET and POST are both methods of requesting data from the server. Both
> are sent by the browser to request a page from the server. They include
> the URI to be retrieved.
>
> The only difference between them is how they send specific data to the
> server. The GET method includes parameters int he URI string. The POST
> method sends the data as a separate string, similar to the way cookies
> are sent. The only time the browser will send a POST request is in
> response to a form with an method=post. However, you can POST to a form
> yourself, i.e. by opening a socket and sending a POST request. That's
> what CURL does when requested, for instance. Or, you can do it manually
> (although I don't recommend it - it gets a bit complex).
>
> Both are bookmarkable. The difference is that when you use a bookmark,
> your browser will always do a GET, even if the original request was a
> POST. This may or may not be important. For instance, often times a
> form submits back to itself for parameter checking. In this case, you
> would only have to fill in the data itself. If, however, the form
> required data, you would get an error from the form itself.
>
> I know all this is wasted on you, Tony. But maybe someone else will
> learn from it.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================
Just to add on to what you were saying: the application that receives
the POST request on the server takes in the data through the STDIN
stream. POST requests can accommodate more data. Rik summed up the
purposes for using each pretty nicely. One should not allow records
from a database to altered through a URI, like this, for example:
http://example.com/admin/?delete=some_ID. I used this when I was still
new to PHP and Web programming.
If only I had known about this newsgroup a long time ago, I probably
would've avoided more pitfalls earlier. ;-)
--
Curtis
Navigation:
[Reply to this message]
|