0

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.

4
  • You can use either RabbitMQ or ZeroMQ for background processing and queuing tasks which will be processed from background later on Commented Apr 8, 2017 at 6:09
  • @SahilGulati I want to start the process when the user submits the form. Commented Apr 8, 2017 at 6:18
  • you can have a queuing system in which you submit form related data to queue which will be processed in background from php Commented Apr 8, 2017 at 6: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 Commented Apr 8, 2017 at 9:50

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.