title: How can I get all the data in a row using php?
body: <p>I followed this youtube video tutorial <a href="https://youtu.be/C--mu07uhQw" rel="nofollow noreferrer">here</a>. It taught me how to get and post the username to the <code>index.php</code> page. I wanted to know how to get all the data in the row not just the <code>username</code> (note: I used the <code>email_address</code> as the username). The table has <code>firstname, lastname, email_address, password</code></p>
  
  <pre><code>if (count($errors) == 0) {
  $password = md5($password);
  $query = "SELECT * FROM user_info WHERE email_address='$username' AND password='$password'";
      $result = mysqli_query($db, $query);
      if (mysqli_num_rows($result) == 1) {
          $_SESSION['email_address'] = $username;
          $_SESSION['success'] = "You are now logged in";
          header('location: dashboard.php');
      } else {
          array_push($errors, "Wrong username/password");
      }
  }
  </code></pre>