Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(!empty($_POST['username']) && !empty($_POST['password'])){
- $username = $_POST['username'];
- $password = $_POST['password'];
- $result = user_login($username,$password);
- if($result){
- @header("Location: index.php");
- }
- }
- }?>
- enter code here
- global $connection;`enter code here`
- if(!empty($username) && !empty($password)){
- $query = "select * from login where username = '$username' and password = '$password'";
- $result = mysqli_query($connection, $query);
- $count = mysqli_num_rows($result);
- if($count > 0 ){
- return true;
- }else{
- echo "We didn't recognise your username or password. Please try again.";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement