title: Unable to fetch multiple row data from mysql using prepared object statements
body: <pre><code>$sql = $conn-&gt;prepare("SELECT username, email FROM users WHERE username=? OR email = ?");
  $sql-&gt;bind_param('ss', $uname, $email);
  $sql-&gt;execute();
  $result = $sql-&gt;get_result();
  $row = $result-&gt;fetch_array(MYSQLI_ASSOC);
  
  if ($row['username'] == $uname) {
      echo "Username not availabe try different";
  } elseif ($row['email'] == $email) {
      echo "email is already taken diiferent";
  } else {
      $stmt = $conn-&gt;prepare("INSERT INTO users (username, email, pass, created) VALUES (?, ?, ?, ?)");
      $stmt-&gt;bind_param('ssss', $username, $email, $pass, $created);
      if ($stmt-&gt;execute()) {
          echo "Registrated sucessfully. Login Now!";
      } else {
          echo "Something went wrong. Please try again";
      }
  }
  </code></pre>
  
  <p>This code is not running. I don't know why. 
  If I'm fetching a single row then it is working but for multiple rows it is not working.</p>
  
  <p>Here I want to validate whether a username and email already exists in the db using prepared statements.</p>