Thanks. Yes it needs another mechanism. I found out that sleep() refreshes the page so the image disappears after the sleep delay. My not-so-elegant solution is to have an iframe that calls another script with just the unlink in it. It works.