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

  • Home
  • SEARCH
  • 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 3631048
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:20:51+00:00 2026-05-19T00:20:51+00:00

This is what runs after submitting a form: else { echo ‘<br/> Tu chisme

  • 0

This is what runs after submitting a form:

else
{
    echo '<br/> Tu chisme se agregó con éxito.';
    echo '<script type="text/javascript">window.location.reload(true);</script>';
}

Basically after the users submits the form it does a couple of things and finally displays a text saying that the post has been submitted successfully and then a second echo tries to reload the page. However I wasn’t able to make it work. It displays the text but it doesn’t reload the page. What’s the problem with the code? Please ask for any info. Thanks

  • 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-19T00:20:51+00:00Added an answer on May 19, 2026 at 12:20 am

    The right thing to do after a POST is a ‘Redirect After Post’, that means sending an HTTP header with a 303 code (not a simple 302 code, most browser will prevent you from reposting with the back button if you use the 303 code, it’s done for that purpose).

    You should’nt have send anything before sending this HTTP header code (try using ob_start/ob_flush functions to control that).

    So, well, in fact the HTTP protocol contains everything you need to control behavior after POST requests, it’s really better to avoid use of JavaScript for that.

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

Sidebar

Related Questions

I have some C++ source code with templates maybe like this - doxygen runs
I am writing a windows service. This service runs another process I've developed through
This code produces a FileNotFoundException, but ultimately runs without issue: void ReadXml() { XmlSerializer
This a bit of strange one.... We have an internal web app that runs
I have this HTML code for radios: <input type='radio' name='a_27' value='Yes' id='a_27_0' /> <input
Here's the code - this runs as soon as the document is loaded (inside
I have a python script that makes an attribute table of a raster. This
I’m installing a spanish lang pack on SP 2010 and Wizard that runs after
Trying to create an Oracle trigger that runs after a table is updated in
I am new to programming in Javascript and this one has clearly 'clean bowled'

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.