diff options
Diffstat (limited to 'admin/admin_functions.php')
-rw-r--r-- | admin/admin_functions.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/admin/admin_functions.php b/admin/admin_functions.php index 83392a1..95c2aa5 100644 --- a/admin/admin_functions.php +++ b/admin/admin_functions.php @@ -50,8 +50,8 @@ function login() $password = crypt(md5($password),'iamnotadirtywhorebitch'); $result = $db->Query("SELECT * FROM bayonet_users WHERE username = '$username' AND password = '$password' LIMIT 1"); $rows = $db->Rows($result); - $row = $db->Fetch($result); - + $row = $db->FetchRow($result); + if($rows > 0) { $_SESSION['username'] = stripslashes($username); @@ -64,7 +64,8 @@ function login() ReportError("Login incorrect."); //NOT CORRECT LOGIN, DEFAULT TO LOGIN PAGE - echo "<meta http-equiv=\"Refresh\" content=\"1;url=index.php\">"; + //echo "<meta http-equiv=\"Refresh\" content=\"1;url=index.php\">"; + PageRedirect(1, "index.php"); return false; } |