Session Creation
Before you can store user information in your PHP session, you must first start up the session.
The session_start() function must appear BEFORE the tag:
The code above will register the user's session with the server, allow you to start saving user information, and assign a UID for that user's session.