You are here: Re: why use $_POST when you have $_SESSION? « PHP Programming Language « IT news, forums, messages
Re: why use $_POST when you have $_SESSION?

Posted by Jerry Stuckle on 01/28/07 18:51

Tony Marston wrote:
> "Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
> news:wfKdnTa_dtSiNSHYnZ2dnUVZ_vXinZ2d@comcast.com...
>> Tony Marston wrote:
>>> "Paul Lautman" <paul.lautman@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.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация