storing ajax result into PHP session
<p>I see examples how to fetch data from php to ajax (and display it via javascript.) As in log-in example, we can check whether there is a valid email and password entered, we can simply display "You are now logged in." Till here I understand and work out. But, now as the user logs in, I need to set the php session. 
The login form sends data to the ajax.php, which simply returns a success message. In other case, if I just use php to check valid login details, I can set php session as soon as the script finds match data. </p>

<p>I know I can send ajax data through URL to second php page, where it can access through $_GET. But I want to get that data into SESSION rather than sending through URL. </p>

<p>How I do that?</p>
