GIF89a;
Direktori : /home/serb/www/m/admin/ |
Current File : /home/serb/www/m/admin/process_login.php |
<?php session_start(); //header("Cache-Control: no-cache"); include("../lib/globals.php"); include("../lib/common.php"); $username = $_POST['txtUsername']; $password = $_POST['txtPassword']; $sql = "SELECT * FROM `admin_login` WHERE `username`='".$username."' AND `password`='".$password."'"; $result=execute_query($sql); $fetch=mysql_fetch_array($result); if(mysql_num_rows($result)==0) { echo "<script language=\"JavaScript\" type=\"text/javascript\">\n"; echo "alert(\"Invalid Username or bad Password ! Please try again \");\n"; echo "history.back();\n"; echo "</script>"; exit(); } else { $adminlogin="true"; $userLogin=$uid; /*session_register("adminlogin"); session_register("userLogin"); $_SESSION['userLogin']=$uid;*/ $_SESSION['adminlogin']="true"; //$_SESSION['admin_type']=$fetch['admin_type']; echo "<script language=\"JavaScript\" type=\"text/javascript\">\n"; echo "window.location.href=\"main.php\";\n"; echo "</script>"; } ?>