Jump to content

Redirect without POST data


Raspberry

Recommended Posts

Hi!Do you know a way to tell to the browser we don't want to include POST data while making an HTTP redirection?I don't need them and didn't want to see the "Do you want to resend data?" popup client-side.Or a way to change the displayed URL?The current code is :

http_response_code(307);header('Location: '.$url);
Edited by Raspberry
Link to comment
Share on other sites

So, you redirect. After you process the post data you send a location header to redirect to another page. That will cause the browser to send a get request. If they refresh, it will send another get request, not a post request.

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...