title: Link next to each row in sql table result in php to display full data for that row
body: <p>I am trying to display couple of fields from sql table and want to add a link in each row that takes user to a page that shows all results for that specific table row.</p>
  
  <p>Let me explain more: I have a MySql table that has the following fields: filename, intro_data, content_data, conclusion_data. I have created a php page that displays the list of all data for the filenames &amp; intro_data fields in that sql table using this code:</p>
  
  <pre><code>//Query to select rows or data in table
  $query= "SELECT filename,intro_data FROM file_data";  
  $result=mysqli_query($connect, $query);
  
  if (!$result)  
  {  
    die('Error fetching results: ' . mysqli_error()); 
    exit();  
  }
  
  echo '&lt;table border="1"&gt;'; // start a table tag in the HTML
  //Storing the results in an Array
  while ($row = mysqli_fetch_array($result))  //Creates a loop to loop through results
  {  
      echo "&lt;tr&gt;&lt;td&gt;" . $row['filename'] . '&lt;/td&gt;&lt;td&gt;' . $row['intro_data'] . '&lt;/td&gt;&lt;td&gt; &lt;a href="full_table_row_results.php"&gt;More Info&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;';  
  }  
  echo '&lt;/table&gt;'; //Close the table in HTML
  
  //Closing DB Connection
  mysqli_close($connect); 
  </code></pre>
  
  <p>If you noticed in the above code, I have a "More Info" anchor tag that links to 'full_table_row_results.php'. In this page, I want it to show all the field results (filename, intro_data, content_data, conclusion_data) for that particular row. I know that I can query all results for a table like this:</p>
  
  <pre><code>$query= "SELECT * FROM file_data"; 
  </code></pre>
  
  <p>But how can I create the 'full_table_row_results.php' that queries all fields for that particular row that the user is clicking on? Since the row results are from an array, how do I know which row number in that array has the user clicked on? I am not sure how to code the More Info page. </p>
  
  <p>I am stuck on this and not sure how to implement this. </p>