title: Return Specific Row From DB
body: <p>I have multiple links on a page where each link is suppose to return a specific row of data from a database. When the link is clicked, the user is forwarded to another page where the info associated with that link is displayed. Here is the code:</p>
  
  <pre><code>//db connection: (using xampp)
  mysql_connect('localhost', 'root', '');
  mysql_select_db('db_name');
  $sql = "SELECT * FROM user_input";
  $records = mysql_query($sql);
  
  //code:
  &lt;div&gt;
  $open_report = mtsql_fetch_assoc($records);
      echo "Error Report# {$open_report['id']};
      echo "&lt;p&gt;" .$open_report['comments'] . "&lt;/p&gt;";
  &lt;/div&gt;
  </code></pre>
  
  <p>The problem is it always returns the same row of data. Each row in the db is associated with a link and when that link is clicked I want to return the associated row of data in the db. I think it may have to do with this line: $sql = "SELECT * FROM user_input"; but I'm not sure how to fix it. If anyone can help it would be greatly appreciated. </p>