title: How to check window close event in php, in an "if" condition?
body: <p>How can I check if the user is closing the window after filling in one or more forms (parts) of a multipart form, but not all the parts.</p>
  
  <p>I have to send the data collected from all/some parts of multipart form to the external server.</p>
  
  <p>One condition is that, I can send the data to the external server only once for one complete form.</p>
  
  <p>edit: after 2 answersi have edited my question a bit</p>