Advertisement
Guest User

Untitled

a guest
Jan 13th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. $email = mysqli_real_escape_string($con,$_POST['user']);
  2. $pass = mysqli_real_escape_string($con,$_POST['pass']);
  3. $sel_user = "select * from admins where email='$email' AND password='$pass'";
  4. $run_user = mysqli_query($con, $sel_user);
  5. $check_user = mysqli_num_rows($run_user);
  6. if($check_user>0)
  7. {
  8. $_SESSION['email']=$email
  9. echo "<script>window.open('index2.html','_self')</script>";
  10. }
  11. else {
  12. echo "<script>alert('Email or password is not correct, try again!')</script>";
  13. }
  14.  
  15. <?php
  16. session_start();
  17. ?>
  18. <div class="inline-block">
  19. <h5 class="no-margin"> Welcome </h5>
  20. <h4 class="no-margin"> <?php echo $_SESSION['email']; ?> </h4>
  21. <a class="btn user-options sb_toggle">
  22. <i class="fa fa-cog"></i>
  23. </a>
  24. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement