[FX.php List] Results of FMNew()

Kevin Futter kfutter at sbc.melb.catholic.edu.au
Mon Dec 12 14:40:24 MST 2005


On 13/12/05 4:27 AM, "Steve Hannah" <shannah at sfu.ca> wrote:

> 
> On 12-Dec-05, at 8:08 AM, Bob Patin wrote:
> 
>> Hi Andy,
>> 
>> Thanks so much for your great answer; that was exactly what I was wondering.
>> 
>> So is there a general rule about which to use in different situations? I just
>> started working with PHP about a month ago, and have used nothing but POST in
>> the solutions I've done. Why did you use REQUEST in your example? I assume
>> you had a good reason... :)
> 
> The general rule of thumb is to use $_POST if the page is going to modify
> data, and $_GET if nothing will be modified.   Since $_REQUEST contains both
> $_GET and $_POST, it can be used in place of $_GET when you don't care about
> how the parameters are passed - but $_POST should still be used if data is
> going to be modified.
> 
> Hope this helps.
> 
> -Steve 
> 
The best way to conceptualise the difference (and in fact, the way it was
intended to be used) is that POST is for submitting (posting) data ­ to a
database, CGI program, server-side script, etc ­ and GET is for retrieving
information (usually from a db). The exception here would be login pages,
where you¹re really just polling a database or other auth source, but don¹t
want things like passwords appended to the query string for anyone to see.

-- 
Kevin Futter
Webmaster, St. Bernard's College
http://www.sbc.melb.catholic.edu.au/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20051213/68bfc6ef/attachment.html


More information about the FX.php_List mailing list