[FX.php List] Results of FMNew()

Bob Patin bob at patin.com
Mon Dec 12 09:08:24 MST 2005


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... :)

On a slightly-related topic: I had a case the other day where the  
user POSTs some data; they go to a 2nd page where 1 of 2 things  
happens: if they live in the U.S. or Canada, an invoice shows; if  
they don't, I send them to a faxable page. To show the POST data on  
this faxable page, I wanted to grab the data they'd posted originally  
on page 1. The only way that I could think to move the data from page  
1 (the SUBMIT page) to the 3rd page was to put the POST data into  
SESSION variables, and then retrieve it for creating the 3rd page.

So here's the question: on page 2, I'd retrieved the SESSION data; is  
there a way to "store" these variables without using the SESSION  
variable, or was that the best method? When I went to the 3rd page,  
could I have retrieved these POST variables again? I assume they  
weren't retrievable on this 3rd page, am I correct?

I hope this makes sense in my explanation!

Bob


On Dec 12, 2005, at 9:56 AM, andy at fmpug.com wrote:

> Hi Bob -
>
> $_REQUEST will accept values from either a $_GET or a $_POST.
>
> Always use $_POST if you want to be more secure, as the variable  
> information is not returned to the visitor in the page address.
>
> The downside of using $_POST is that if your visitors refresh a  
> page, they will receive a warning stating they need to resubmit the  
> information. a $_GET will add the variables to the web address,  
> thus allowing a refresh to happen without warnings.
>
> Hope this helps
>
> Andy Gaunt
> andy at fmpug.com
> http://www.fmpug.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20051212/9620e53b/attachment-0001.html


More information about the FX.php_List mailing list