below is my login page code… i am trying to incorporate multi user login ( admin redirects to admin page, manager to manager page) i have tried absoloutley EVERYTHING and cannot get it done.
Can one of your very smart lovely people please PLEASE PLEASE help me!
<?php
session_start();
error_reporting(0);
include('include/dbconnection.php');
if(isset($_POST['login']))
{
$adminuser=$_POST['username'];
$password=md5($_POST['password']);
$query=mysqli_query($con,"select ID from tbladmin where UserName='$adminuser' && Password='$password' ");
$ret=mysqli_fetch_array($query);
if($ret>0){
$_SESSION['pdaid']=$ret['ID'];
header('location:loading.php');
}
else{
$msg="Invalid Details, Try again or contact site admin.";
}
}
?>