[FX.php List] preventing refresh from rePOSTing?

william.downs william.downs at gmail.com
Thu Jun 5 06:53:08 MDT 2008


Hi Joel,

At the risk of sounding like a total arse, the MVC architectural  
pattern is a good way of avoiding the initial problem. - which is  
that a refresh does a repost.

It was not designed specifically for this problem, but it is a proper  
way of design - which I have only started to implement myself.

Therein you have pages which do specific tasks - example FMNew -   
then present the user with another page - example FMFind

Of course, I have once again not slept for a few days, so I may be  
slightly spaced out as I write ...

Kindest Regards,

William


On 4 Jun 2008, at 22:51, Joel Shapiro wrote:
> Hi all
>
> I've got a real small project in which a user fills out a web form,  
> and as long as all required fields contain data, a new record gets  
> created on submit.
>
> I've got the processing and the form on the same php page.
>
> Can anyone suggest a quick/easy way to prevent the user from  
> rePOSTing -- and thus adding an additional (duplicate) record -- by  
> refreshing the page after submission?  The page *does* need to  
> allow a user to submit additional records after the first  
> submission, but I don't want a simple refresh to create a new record.
>
> I can think of some ways to do this but don't want to re-invent the  
> wheel if there's some standard way to do this already.
>
> TIA,
> -Joel
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list