Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. <?php
  2. session_start();
  3. $con = mysqli_connect('localhost', 'root', '');
  4. mysqli_select_db($con, 'tut1userregistration');
  5. $name = $_POST['user'];
  6. $pass = $_POST['password'];
  7. $s = " select * from usertable where name = '$name' && password = '$pass'";
  8. $result = mysqli_query($con , $s);
  9. $num = mysqli_num_rows($result);
  10. if ($num == 1) {
  11. header('location:home.php');
  12. }else{
  13. header('location:login.php');
  14. }
  15. // doktorigi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement