PHP Session var through AJAX problem
is it possible to define a PHP Session var through AJAX? I'm doing it in the background of a script and it seems to be kind of random开发者_运维知识库.
Yes, most definitely. As long as the AJAX endpoint is on the same server as the rest of your site, this will definitely work.
Remember, AJAX is HTTP messaging just like any other normal web page request. This means any registered cookies for the domain will be sent with those AJAX requests, which means the session can be used.
精彩评论