I'm pretty new to PHP so please just bear with me here...
I'm wondering if it's possible to execute a PHP script in the background, without disrupting the user's experience.
I've created a contact form and specified contact.php as it's action. However when submitted, this navigates the user away from the page and I use the PHP echo function to return the user back to the page once the script has completed (once the message has sent). What I'm trying to do specifically is this; once the user clicks "send", contact.php will execute in the background and once it has completed (or once the message has sent), a DIV will be displayed on the page - and all this occurs without the visitor being taken away from that page and without any other windows appearing.
Question
Matt T
I'm pretty new to PHP so please just bear with me here...
I'm wondering if it's possible to execute a PHP script in the background, without disrupting the user's experience.
I've created a contact form and specified contact.php as it's action. However when submitted, this navigates the user away from the page and I use the PHP echo function to return the user back to the page once the script has completed (once the message has sent). What I'm trying to do specifically is this; once the user clicks "send", contact.php will execute in the background and once it has completed (or once the message has sent), a DIV will be displayed on the page - and all this occurs without the visitor being taken away from that page and without any other windows appearing.
Is it possible?
Link to comment
https://www.neowin.net/forum/topic/617980-execute-php-script-in-the-background/Share on other sites
8 answers to this question
Recommended Posts