Ostap34JS

Untitled

Jan 24th, 2017
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.60 KB | None | 0 0
  1. <?php
  2. session_start();
  3. include"includes/connection.php";
  4. if(isset($_POST['login'])){
  5. $email = mysqli_real_escape_string($con,$_POST['email']);
  6. $pass = mysqli_real_escape_string($con,$_POST['pass']);
  7. $get_user = "select * from `users` where `user_email` = '$email' AND `user_pass`='$pass'";
  8. $run_user = mysqli_query($con,$get_user);
  9. $check = mysqli_num_rows($run_user);
  10.  
  11. if($check == 1){
  12. $_SESSION['email'] = $email;
  13. echo"<script>window.open('home.php','_self');</script>";
  14. }
  15. else{
  16. echo"<script>alert('Пароль або емейл введено невірно!');</script>";
  17. }
  18. }
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment