Jump to content

problem ending upload script


MoMoMajor

Recommended Posts

Ok so i have a simple image upload script and I am unable to make the stop executing after the first upload. After the initial upload loads successfully it continues to load the same image whenever the user refreshes the page.

 

i have tried unset($_FILES['userfile']) and also making the script die but neither work.

Link to comment
https://forums.phpfreaks.com/topic/167236-problem-ending-upload-script/
Share on other sites

If you don't want the file to re-upload when the user hits refresh, you will have to redirect them to another page and back. You can do this in the background on the server in a few ways. You can have the php processing done in it's own file, redirecting the user to the landing page after the processing, or you can do the processing on the same page, and after it has finished processing, it redirects the user to another page and then right back to that page (they won't see this happen - it's in the background on the server).

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.