[thelist] POSTDATA & CFML
Douglas Williams
douglas at ourwilliamsfamily.com
Mon Feb 25 18:47:51 CST 2002
----- Original Message -----
From: "Carlos Carter" <ccarter at amnh.org>
> So here's the problem. I have the user submit data through a form
> and then I write a file that contains this data. Finally I output
> it. So the user sees the content of the file and then if s/he
> reloads the page this alert will pop up in NN6 for mac:
>
> "The page you are trying to view contains POSTDATA that has expired
> from cache. If you resend the date, any action the form carried out
> (such as search or online purchase) will be repeated. To resend the
> data, click OK. Otherwise, click Cancel"
>
> If the user clicks 'OK' then the file is written again and the
> original data is appended. This is a problem because this data
> should only be found once in the file. If the user clicks cancel we
> are led nowhere. Does anybody know how to prevent this using CFML?
>
> Thanks,
>
> Carlitos
I don't know of an easy way to detect the header to stop the double-posting,
but one way around is a method I always try to follow. Instead of
outputting the file on the action page, just use a cflocation to another
page with a URL variable to another page which outputs the same data without
the threat of double-posting.
HTH,
Douglas
More information about the thelist
mailing list