I have one PHP script with a session variable, set like so:
$_SESSION[\'VAR1\'] = \"test\"
Now, I am using AJAX via a jQuery-initiated POST
In jQuery or JavaScript, you can get the session value like this:
var StepIndexval = '<%= Session["StepIndex"].ToString() %>'; alert(StepIndexval);