Hey WebmasterWorlders
I had a quick question that I was hoping someone could briefly help me out with or point me in the right direction. It's about running a PHP function simultaenously (or asynchronously I guess?) as it also echo's data back to the AJAX that called it.
I'd like to make an AJAX call to my Controller that gets some JSON data from a page. Then with that data I would like to send it back to the AJAX by echo json_encode()ing it but I'd also like to send that data to another PHP function that stores the data to the database.
My concern is that if I echo'd the information back and then sent the data to the storing function, the AJAX would not register onComplete until the function reached its return; after sending the information.
So our onComplete wouldn't do anything until the info was received and stored but I'd like it to be done as soon as the info is received.
Any helps, pointers, or insight would be a great help.
Thanks
John