I have a form with action set to a php-file (verify.php). In the form, I have made a pretty nice picture upload section. After submitting the form, the verify.php is opened to verify the form filled in by the user.
The form values are all placed inside another form on the verify.php page. Only the image is uploaded to a folder on the server, and this is my problem. I want the image to be deleted if the user regrets (doesn't verify) putting in an ad, or if the user goes back to change the ad again.
How would I do this?
One way could be to delete the filename whenever page 'unLoads' (user hits back button). But that wont solve the problem if the user closes the browser on the verify.php page, because that doesnt count as an 'unload' does it?
Solutions?
If you need more input, tell me and I will update this post!
Thanks