Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

No action after a page refresh

Participant ,
Oct 23, 2009 Oct 23, 2009

Does anyone know how to stop a Coldfusion insert statement from doing it again if someone refreshes their browser?  I have really never thought about this before and my mind is drawing a blank.

So right now I have a form that passes variables to an insert statement, problem is if someone refreshes the page it will insert again. I need to not allow this.

Thanks in advance for any help.

544
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , Oct 23, 2009 Oct 23, 2009

A couple of common simple solutions is to do a <cflocation...> or some other redirect to another page so that if they refresh that page, the insert CFML is not run again OR to set some type of session or other flag that indicates the insert has been done and to not do it again.

Translate
Valorous Hero ,
Oct 23, 2009 Oct 23, 2009

A couple of common simple solutions is to do a <cflocation...> or some other redirect to another page so that if they refresh that page, the insert CFML is not run again OR to set some type of session or other flag that indicates the insert has been done and to not do it again.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 23, 2009 Oct 23, 2009
LATEST

Thanks, my brain is mush today. I just added a redirect after the insert statement to another page. That way if it gets refreshed nothing happens.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources