Guest User

Untitled

a guest
Nov 30th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. $conn = new mysqli('localhost','user','password','db');
  2.  
  3. $sql = "SELECT Status FROM Users WHERE Username = '".$_GET["username"]."'
  4. AND Password = '".$_GET["password"]."'";
  5. $result = $conn->query($sql);
  6.  
  7. if ($result->num_rows > 0) {
  8. while($row = $result->fetch_assoc()) {
  9. // This is where it is giving the error
  10. echo $row['Status'] ;
  11. }
  12. } else {
  13. echo "0 results";
  14. }
  15. $conn->close();
Add Comment
Please, Sign In to add comment