Can a script called by XHR reference $_COOKIE?
- by Christian Mann
Quick yes/no - I'm building an AJAX application and some scripts require authentication. Can I read $_COOKIE['username'] and $_COOKIE['password'] on the server if the PHP script was called via XHR, whether that be $.get() or $.post()?
Side question: Can it also set cookies? Is that considered "good practice"?