Guest User

Untitled

a guest
May 8th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. if(isset($_POST['user']) && isset($_POST['password']) &&
  2. isset($_POST['type'])){
  3. $user=$_POST['user'];
  4. $userpassword=$_POST['password'];
  5. $type=$_POST['type'];
  6.  
  7. if($type=='Admin'){
  8. $query= "SELECT where Username='$user' and Password='$userpassword' and
  9. Type='$type' from staff";
  10. $loginresult=mysql_query($query,$con);
  11. while($row=mysql_fetch_row($loginresult)){
  12. if($row['user']==$user && $row['password']==$password && $row['type'] ==
  13. $type){
  14. $_SESSION['admin']=$user;
  15. header("Location: home.php");
Add Comment
Please, Sign In to add comment