Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(isset($_POST['user']) && isset($_POST['password']) &&
- isset($_POST['type'])){
- $user=$_POST['user'];
- $userpassword=$_POST['password'];
- $type=$_POST['type'];
- if($type=='Admin'){
- $query= "SELECT where Username='$user' and Password='$userpassword' and
- Type='$type' from staff";
- $loginresult=mysql_query($query,$con);
- while($row=mysql_fetch_row($loginresult)){
- if($row['user']==$user && $row['password']==$password && $row['type'] ==
- $type){
- $_SESSION['admin']=$user;
- header("Location: home.php");
Add Comment
Please, Sign In to add comment