title: PHP Redirecting
body: <p>I have a database, after the redirect I want a table row to display the row information using that rows id. How would I type that?</p>
  
  <p>I built an edit.php and a login.php, now when I click edit then it redirects to the login, now after I login correctly it redirects to edit.php, problem is that the edit.php is not displaying the rows for me to edit.</p>
  
  <p>Assuming this is all the code that is needed, how do I correct this: </p>
  
  <pre><code>if($hash == $results[0]['hash']) 
  { $_SESSION['user_id'] = $results[0]['id'];
  redirect(''); } else $errors['username'] = 'Login failed.';
  </code></pre>
  
  <p>Ok this is the code that is working now:</p>
  
  <pre><code>if($hash == $results[0]['hash']) 
  { $_SESSION['user_id'] = $results[0]['id'];
  Header( "Location: http://localhost/flagship/web/edit.php?id=" . $_SESSION['user_id'] ); }
  else $errors['username'] = 'Login failed.';
  </code></pre>
  
  <p>Just that its fetching only the first row from the table, how do I get the other rows to display?</p>