File manager - Edit - /home/gyanmanjari-lms/htdocs/lms.gyanmanjari.co.in/login.php.tar
Back
home/gyanmanjari-lms/htdocs/lms.gyanmanjari.co.in/login.php 0000777 00000001434 00000000000 0017743 0 ustar 00 <?php /* session_start(); include 'config/config.php'; $u=$_POST['username']; $p=$_POST['password']; // echo $u . " - " . $p; $q=$conn->query("SELECT * FROM users WHERE username='$u' AND password='$p'"); if($q->num_rows){ $_SESSION['user']=$q->fetch_assoc(); $r=$_SESSION['user']['role']; header("Location: $r/dashboard.php"); } else { echo "Invalid login"; } */ error_reporting(E_ALL); ini_set('display_errors', 1); session_start(); include 'config/config.php'; $u=$_POST['username']; $p=md5($_POST['password']); // echo $u . " - " . $p; exit; $q=$conn->query("SELECT * FROM tbl_admin WHERE username='$u' AND password='$p'"); if($q->num_rows){ $_SESSION['user']=$q->fetch_assoc(); $r=$_SESSION['user']['role']; header("Location: $r/dashboard.php"); } else { echo "Invalid login"; } ?>