I have a form on index.php which takes two fields, i want to display a message as 'You will get an email' when user submits the form. And i want to process the form in the background as it will take more than 15-30 mins. The script shall run even if the users close their browser. I have tried doing it using ajax but the ajax returns message only when the AJAX function succeeds. Is there any way to display the message before the AJAX function succeeds and the script keeps running even after the user close their browser.
Asked
Active
Viewed 748 times
0
-
You can use either `RabbitMQ` or `ZeroMQ` for background processing and queuing tasks which will be processed from background later on – Sahil Gulati Apr 08 '17 at 06:09
-
@SahilGulati I want to start the process when the user submits the form. – M Sam Apr 08 '17 at 06:18
-
you can have a queuing system in which you submit form related data to queue which will be processed in background from php – Sahil Gulati Apr 08 '17 at 06:19
-
@mplungjan i have tried all that..., but i don't want to show the loading message to the user till my ajax script is running... i just want to accept email id from user and when user clicks submit i want to display message that 'you'll get an email' and start processing the script in background... so that user wont be able to see the script running in network tab – M Sam Apr 08 '17 at 09:50