All pastes #181345 Raw Edit

Stuff

public text v1 · immutable
#181345 ·published 2006-09-24 20:42 UTC
rendered paste body
----------------------------------------------------
    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.