This application creates temp files on the server. I want to delete them when the user exits the application.
I accumulate an array of filenames in $_SESSION['deleteRA']. I made 'delete.php' to loop through the list and 'unlink' the files listed there.
'header.php' is included in every screen in the website. So, in 'header.php' I put:
<body onunload="<?php include 'delete.php'; ?>">
<!-- body code -->
</body>
Nothing happened. Charles doesn't indicate any call to 'delete.php'. I fiddled around with quotation marks, too, to no avail.
I hope there's a way to do this, and that someone will point that way out to me.
Thanks (I hope),
Paul