title: How to delete a file whenever user leaves page?
body: <p>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.</p>
  
  <p>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.</p>
  
  <p>How would I do this?</p>
  
  <p>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?</p>
  
  <p>Solutions?</p>
  
  <p>If you need more input, tell me and I will update this post!</p>
  
  <p>Thanks</p>