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
Better check if session_start() is present in home.php. Without this you will not be able to read the session data.
session_start()
When you are doing echo $_SESSION['UserID'] = $UserID; you will assigning and accessing at a same line, so it will obviously work.
echo $_SESSION['UserID'] = $UserID;