I have just migrated my application from a local WAMP to the actual online server. This has caused trouble with the session ID not being saved as it appears.
session_start should be the first thing in your file, you can get the session id afterwards:
session_start
session_start(); $sId = session_id();