diff --git a/gw-login.php b/gw-login.php index 35fb330..46be2aa 100644 --- a/gw-login.php +++ b/gw-login.php @@ -11,19 +11,16 @@ if ($con->connect_errno > 0){ echo 'broke something above the sql statement!
'; $sqllogin = "SELECT * FROM users WHERE users.username = '$username' and password = '$password'"; if ($result = $con->query($sqllogin)){ - if ($result->fetchColumn() > 0){ - while ($row = $result->fetch_array()){ - $uname = $row['username']; - $uid = $row['userid']; - $access = $row['access']; - $_SESSION['username'] = $uname; - $_SESSION['userid'] = $uid; - $_SESSION['access'] = $access; - echo 'Your username is ' . $uname . '. Your userid is ' . $uid . '. Your access level is ' . $access . '.
'; - } - } else { - echo 'Login failed - please try again here'; + while ($row = $result->fetch_array()){ + $uname = $row['username']; + $uid = $row['userid']; + $access = $row['access']; + $_SESSION['username'] = $uname; + $_SESSION['userid'] = $uid; + $_SESSION['access'] = $access; + echo 'Your username is ' . $uname . '. Your userid is ' . $uid . '. Your access level is ' . $access . '.
'; } + echo 'Login failed - please try again here'; } echo 'Proceed to character selection here
'; //really should automate this ?> \ No newline at end of file