Advertisement
andimubaroq

ll

Jun 21st, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. <?php
  2. session_start();
  3.  
  4. ?>
  5. <?php
  6.  
  7. include("db_conection.php");
  8.  
  9.  
  10.  
  11. if(isset($_POST['user_login']))
  12. {
  13. $user_email=$_POST['user_email'];
  14. $user_password=$_POST['user_password'];
  15.  
  16.  
  17. $check_user="select * from users WHERE user_email='$user_email' AND user_password='$user_password'";
  18.  
  19.  
  20. $run=mysqli_query($dbcon,$check_user);
  21.  
  22. if(mysqli_num_rows($run))
  23. {
  24. echo "<script>alert('You're successfully login!')</script>";
  25.  
  26. echo "<script>window.open('Customers/index.php','_self')</script>";
  27.  
  28. $_SESSION['user_email']=$user_email;
  29.  
  30.  
  31.  
  32. }
  33. else
  34. {
  35. echo "<script>alert('Email or password is incorrect!')</script>";
  36. echo "<script>window.open('index.php','_self')</script>";
  37.  
  38. exit();
  39.  
  40. }
  41. }
  42. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement