Jump to content

[SOLVED] php page that posts to iteself


bigtimslim

Recommended Posts

I have created a php page that takes some text and an image path then on submit posts to itself and creates a new image and saves it and displays it.

 

I want the user to be able to easily do this again right away with another image and or text so on the 'submitted' page I have a link back to itself. Problem with this is when submit is hit with the new info entered, it gives me the result of the last submission. I have to hit refresh, and the browser asks me if im sure. Is there a way around this, or is my method just stupid and there is a better way of handling this? thanks.

Link to comment
https://forums.phpfreaks.com/topic/100262-solved-php-page-that-posts-to-iteself/
Share on other sites

instead of giving the result of the last submission have it create a status saying it was successful and reshow the form.

 

As the first line of your process.php code:

 

header("Location: http://localhost/~formlocation");

 

That should take care of it. It will refresh and appear as if it was "posting to itself."

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.