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