Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once 'connect.php';
- $username = $_POST['username'];
- $password = $_POST['password'];
- $stmt = $conn->prepare("SELECT * FROM `user` WHERE username = '$username' && `password` = '$password'") or die(mysqli_error());
- if($stmt->execute()){
- $result = $stmt->get_result();
- $num_rows = $result->num_rows;
- }
- if($num_rows > 0){
- echo "Success";
- }else{
- echo "Error";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement