[FX.php List] preventing refresh from rePOSTing?

Joel Shapiro jsfmp at earthlink.net
Wed Jun 4 16:30:37 MDT 2008


Thanks for the quick reply, Bob.

I had thought of that, but it seemed like a lot to do (do a find for  
all fields on the form)

What I did was put:
  header('Location: mypage.php');
  exit;

after a successful FMNew(), so now a refresh no longer contains POST  
data

Solved (& pretty painlessly :)

-Joel


On Jun 4, 2008, at 3:08 PM, Bob Patin wrote:

> I don't know of a standard way, but you might write some code that  
> does a duplicate check before writing the record; send some sort of  
> unique identifier with your POST, and then a dupe record couldn't  
> be created...
>
> Off the top of my rather bald head,
>
> Bob Patin
> Longterm Solutions
> bob at longtermsolutions.com
> 615-333-6858
> http://www.longtermsolutions.com
> FileMaker 9 Certified Developer
> Member of FileMaker Business Alliance and FileMaker TechNet
>
>   CONTACT US VIA INSTANT MESSAGING:
>      AIM or iChat: longterm1954
>      Yahoo: longterm_solutions
>      MSN: tech at longtermsolutions.com
>      ICQ: 159333060
>
> --------------------------
> Contact us for FileMaker hosting and programming for all versions  
> of FileMaker
> PHP • CDML • Full email services • Free DNS hosting • Colocation •  
> Consulting
>
>
>
>
> On Jun 4, 2008, at 4:51 PM, 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
>
> _______________________________________________
> 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