I have a page where people can login and their login request is sent with jQuery's $.ajax to a processing page. On that page all of the errors collected during the login attempt are stored in $_SESSION['error'].
How can I access this variable to alert users of the errors after the attempt is made. I know how to access a session variale, I mean how do I access a php variable without reloading the page. The only way I currently am aware of is to inject them on page load, but there must be some way to access them with JavaScript after they have changed due to an Ajax request.