Jump to content

SagarPanchal

New Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by SagarPanchal

  1. if(isset($_POST['submit'])){ $uname = $_POST['uname']; $pass = $_POST['pass']; $cnvrt_pass = md5($pass); //$table = "s_admin"; // $condition = "`a_uname`='".$uname."' and `a_pass`='".$pass."'"; // $fetchuser = $school->fetchrecord($table,$condition); // if(0<count($fetchuser)){ // $_SESSION['valid_user'] = $uname; // header("location:index.php"); // }else{ // $error = "User name or passsword invalid!"; // } // } $table = "s_admin"; $condition = "`a_uname`='".$uname."' and `a_pass`='".$pass."'"; $fetchuser = $school->fetchrecord($table,$condition); if(0<count($fetchuser)){ $_SESSION['valid_user'] = $uname; header("location:admin/view_schools.php"); }else { $error = "User name or passsword invalid!"; } if(isset($error)){ $table = "s_user"; $condition = "`u_uname`='".$uname."' and `u_pass`='".$pass."' and `u_status`= '1'"; $fetchuser = $school->fetchrecord($table,$condition); if(0<count($fetchuser)){ $_SESSION['valid_user'] = $uname; header("location:local_user/u_dashboard.php"); }else { $error = "User name or passsword invalid!"; } } }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.