I\'m trying to build my AJAX login system but I\'m having some problems with PHP sessions.
This is the AJAX code I use in my index.php:
index.php
You need to initiate the session first, like session_start().then only you can have the access to session variables. Have a look at this simple example , it might help you:
aj.php