Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $query = "SELECT * FROM `user` WHERE username='$username' and password='$password'";
- $stmt = $connection->prepare('SELECT * FROM user where username=? and password=?');
- $stmt->bind_param('ss', $username,$password);
- $stmt->execute();
- $result = $stmt->get_result();
- //var_dump($stmt);
- $count = $result->num_rows;
- //$result = mysqli_query($connection, $query) or die(mysqli_error($connection));
- //$count = mysqli_num_rows($result);
- //3.1.2 If the posted values are equal to the database values, then session will be created for the user.
- $stmt->close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement