Advertisement
Guest User

Untitled

a guest
Feb 10th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. <?php
  2. require_once 'connect.php';
  3. $username = $_POST['username'];
  4. $password = $_POST['password'];
  5. $stmt = $conn->prepare("SELECT * FROM `user` WHERE username = '$username' && `password` = '$password'") or die(mysqli_error());
  6. if($stmt->execute()){
  7. $result = $stmt->get_result();
  8. $num_rows = $result->num_rows;
  9. }
  10. if($num_rows > 0){
  11. echo "Success";
  12. }else{
  13. echo "Error";
  14. }
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement