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
An addendum to what Salman A wrote:
If you set a session variable in an https:// file and try to access it with a http:// file you will not be able to...
https://www.example.com/index.php - call session_start() and set session variable
http://ww.example.com/index_tmp.php - unable to access session variable
and vice versa...
http://www.example.com/index.php - call session_start() and set session variable
https://ww.example.com/index_tmp.php - unable to access session variable
Rather:
https://www.example.com/index.php - call session_start() and set session variable
https://ww.example.com/index_tmp.php - Able to access session variable
And:
http://www.example.com/index.php - call session_start() and set session variable
http://ww.example.com/index_tmp.php - Able to access session variable