How can I setcookies in php server side with ajax and read cookies in the real time with javascript?
Example: After pressed "ok" button, the client side will call ajax and ajax will call to php server side to collect data. It will also assign value into cookies in php server side while it's getting the data. At the sametime, I want to read the assigned value cookies with another function in real time(function will call from the ajax when it's start calling to php server) and display the cookies value on the client side.
I tried this many time, but seem like the function can only get the updated cookies value after the ajax process is complated.