I have a script that inputs/updates db from submitted form. I just added another code that sends email messages to a number of users that may be affected by the posted information. I put this script right before in run a db query and it's basically a loop that matches appropriate accounts and sends an email.
Depending on how many accounts are affected it may take a little while before the pages returns back to the original one with the form. I was thinking that perhaps I could take the email script and put it into a separate page and trigger it at the same time when I process the data, so that the two work simultaneously and the user did not have to wait for the page to refresh, while the email script cranks out on its own on the background.
Now it's just my theory and I have no idea how to implement this. Any suggestions would be highly appreciated.