session_start(); include'include/connection.php'; ob_start(); if($_REQUEST['a_login']=="OK") { //echo "Hello"; $login=$_REQUEST['a_name']; $password=$_REQUEST['a_pass']; $result=mysql_query("SELECT a_login.name,a_login.password,active_user.user_name,active_user.user_pass FROM a_login,active_user where (a_login.name='$login' AND a_login.password='$password') || (active_user.user_name='$login' AND active_user.user_pass='$password')") or die("Error - Unable to connect Admin Pannel!!"); if(mysql_num_rows($result)==0) { $msg="Incorrect Login ID & Password!"; $active=0; } else { $_SESSION['user_name']=$login; if($_SESSION['user_name']=="admin") { header("Location:cpanel/index.php?type=home"); } else { header("Location:cpanel/view_prod.php?user=".$_SESSION['user_name'].""); } die(); } } ob_end_flush(); ?>
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| include'footer.php'; ?> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||