---------------------------------------------------- function alreadyLoggedIn() { if ( $_SESSION['logged_in'] == 1 ) { return 1; } else { return 0; } } ---------------------------------------------------- That one does not work, and it's called like this: alreadyLoggedIn == 1 ) { echo "Welkom, u bent reeds ingelogd."; ---------------------------------------------------- function _createSession($userid, $accesslevel) { $_SESSION['logged_in'] = 1; $_SESSION['userid'] = $userid; $_SESSION['accesslevel'] = $accesslevel; } ---------------------------------------------------- The above works.