Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 359359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T12:23:11+00:00 2026-05-12T12:23:11+00:00

After submitting a form with post method f5 will resubmit that. What’s the best

  • 0

After submitting a form with post method f5 will resubmit that.
What’s the best to avoid this without redirecting a page. Idon’t like to disturb the user like this. Stackoverflow are immune to f5 but i don’t see any redirection after asking a question.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T12:23:11+00:00Added an answer on May 12, 2026 at 12:23 pm

    StackOverflow is pretty AJAX-heavy, which is why you’re seeing the behavior you see.

    If you don’t want to get all AJAXy, you want redirects. Redirects of this sort should be transparent to the user:

    if (! empty($_POST)){
       // Do something with the contents of $_POST
       header('Location: success.php');
    }
    

    Now, if your validation fails, you probably reload the form with some error messages, and hammering F5 will re-POST the data. But if the operation is successful, the user will be redirected to your success page, and they can hammer f5 all day without rePOSTing data, and potentially creating duplicate actions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code : <form id=form2 name=form2 method=post action=> <table dir=ltr width=554 border=0
I have this code below. I expected after submitting the form it goes to
This is what runs after submitting a form: else { echo '<br/> Tu chisme
I am submitting from a form to another php page which is supposed to
The ASP.NET MVC pattern of submitting forms via post, then redirecting to the same
User registration in my application is performed in steps. After submitting the form, some
When a user registers, if there is an error, after submitting the page refreshes
After reading this article I made a point that int () yields 0 because
After reading this question , I was reminded of when I was taught Java
After being told by at least 10 people on SO that version control was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.