Ok, basically, I have a simple customer database. When somebody adds a listing, a window pops up, and after a 5 second delay (using sleep()😉, shows a ticket and opens a print dialogue.
This ticket page is also accessable from the master listing, and will still ask to print immediately. However, the 5 second delay is still there.
I put the delay in because when first adding a listing, the popup comes up before the information is added to the database, and thusly all my variables are NULL.
What I'm thinking as a workaround, is to perform a simple check as to what file caused the popup (either index.php or newEntry.php) and if it is newEntry.php, then do the sleep function, otherwise just spit the information out.
Is there any way I can do this, or does anybody know of a better way?