title: How do we create a temp page based upon an ID number and retrieve that ID numbers data?
body: <p>I currently have a table 'candidatedetails' containing peoples data. I can retrieve the data and show in a page if i create the page manually. However i don't want to have to manually create every page.</p>
  <p>I have a link to each person:</p>
  <p><code>echo '&lt;td&gt;  &lt;a href=&quot;'.$row['payroll_number'].'&quot;&gt;&lt;img src=&quot;images/document.jpg&quot; height=&quot;30&quot; &gt;           &lt;/a&gt;&lt;/td&gt;';</code></p>
  <p>This links to the unique ID (payroll_number) as 192.168.1.16/5100 (where 5100 is the payroll number in this instance)</p>
  <p>I am trying to use the following so that when the link above is clicked on it creates a temp file and goes to a tmp page where all the candidate details are available to view</p>
  <pre><code>`&lt;?php
  $temp = tmpfile();
  
  fwrite($temp, file_get_contents(&quot;$path/$filename&quot;));
  //Rewind to the start of file
  rewind($temp);
  //Read 1k from file
  echo fread($temp,1024);
  
  //This removes the file
  fclose($temp);
  ?&gt;`
  </code></pre>
  <p><a href="https://i.stack.imgur.com/ceeab.jpg" rel="nofollow noreferrer">screenshot of people table with link to record</a></p>