|
Posted by Jaspreet on 01/30/07 05:19
On Jan 28, 11:51 pm, Jerry Stuckle <jstuck...@attglobal.net> 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).
>
Also since GET method includes parameters in the URL list, it is not
preferred since you would not want the user data moving across in the
URL which could be easily played around. Ok, then you could encrypt
and send the data in the URL but then there is a limit on the amount
of data you can transfer using GET in the URL.
<snip>
Navigation:
[Reply to this message]
|