$rowcnt = mysqli_num_rows($loginResult);
if($rowcnt !="1"){
            echo "Auth failed";
            die("Auth failed... Sorry");
}else{
            while($row1 = mysqli_fetch_array($loginResult)) {
                $_SESSION['user'] = $row1['loginName'];
                $_SESSION['loggedin'] = "YES";

Eww. Use booleans:

$_SESSION['loggedin'] = true;

                $table = $row1['tableName'];
                $adminLevel = $row1['adminLevel'];
                $authenticated = "TRUE";

Like above, I would advise using booleans (true/false) and not strings (text):

$authenticated = true; // Note the lack of quote marks

--
Richard Heyes
Employ me:
http://www.phpguru.org/cv

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to