Code

« See all FAQs for PHP Login & User Management with message center

Check if user is loged in or not?

By using following if condition we can check if user is loged in or not.

if(isset($_SESSION['user_id']) && $_SESSION['user_id'] != '') { 
    //Here you can do for loged in user.
} else { 
     //Here you can do when user is not loged in
}
by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey