I have a website where users can log in. I have tried:
and When users login I set their session as
Without showing more code we cant comment much, but are you sure you are calling session_start in each page you use your session variable too? Also ensure you are using the same capitalisation (userlogin != UserLogin).