So I have some PHP that takes some time that runs in the background. I just want my code to say "Command executed. Invites pending." - And that will be all that the user will see from their end. Everything else in my .php script will be done in the background.
I was thinking about somehow executing it with jQuery and have it stop loading the script mid-execute of the post. And then use ignore_user_abort()
Here is the jQuery code I plan on using:
jQuery.ajax({
type: 'POST',
data: { ' MyPostData'},
dataType: 'html',
url: 'myPHP.php',
success: function (d) { /* commands */ }
});
The only thing I'm missing is having it stop the call after it's originally called upon, and then I need for it to append to a div saying "Invites Pending."