Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- $con = mysqli_connect('localhost', 'root', '');
- mysqli_select_db($con, 'tut1userregistration');
- $name = $_POST['user'];
- $pass = $_POST['password'];
- $s = " select * from usertable where name = '$name' && password = '$pass'";
- $result = mysqli_query($con , $s);
- $num = mysqli_num_rows($result);
- if ($num == 1) {
- header('location:home.php');
- }else{
- header('location:login.php');
- }
- // doktorigi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement