PHP help creating seprate page newbie here
<p>Hello I am a total beginner and trying to learn php by watching some youtube videos. So far I have learned how to insert and view data my mysql. But I am a bit stuck on the next part. Basically I created a table that will hold printers information(ip address, model # etc) I have a printers.php page that lists them all in a table that gets pulled in from the database. So far so good.
What I am trying to do now is create a link for each of the printers that get put in the database. So when I click on Model # it will take me to the page for that particular printer. </p>

<p>Here is my modelsample.php template file</p>

<pre><code> &lt;?php
include('includes/PrintFunctions.php');
?&gt;

&lt;html&gt;
    &lt;head&gt;
    &lt;title&gt;&lt;?php echo $mod ?&gt;&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;table&gt;
&lt;tr&gt;
&lt;td&gt;Brand&lt;/td&gt;&lt;td&gt;&lt;?php echo $bran; ?&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model:&lt;/td&gt;&lt;td&gt;&lt;?php echo $mod; ?&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Office:&lt;/td&gt;&lt;td&gt;&lt;?php echo $off; ?&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Location:&lt;/td&gt;&lt;td&gt;&lt;?php echo $loc; ?&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IP Address:&lt;/td&gt;&lt;td&gt;&lt;?php echo $ip; ?&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MAC Address:&lt;/td&gt;&lt;td&gt;&lt;?php echo $mac; ?&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ink Type:&lt;/td&gt;&lt;td&gt;&lt;?php echo $Ink; ?&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>and here is my prinFunctions.php code</p>

<pre><code>   function getPrinters2() {
$query = mysql_query("SELECT * FROM printers") or die (mysql_error());
if (mysql_num_rows($query) == 0) {
echo "&lt;tr&gt;&lt;td colspan=\"3\"&gt;No Printers Were Found&lt;/td&gt;&lt;/tr&gt;";
} else {
while($post = mysql_fetch_assoc($query)) {
$bran=$post['Brand'];
$mod=$post['Model'];
$off=$post['Office'];
$loc=$post['Location'];
$ip=$post['IPAddress'];
$mac=$post['MACAddress'];
$Ink=$post['Ink Order'];
$Stock=$post['Stock'];
$id=$post['id'];
echo "&lt;tr&gt;&lt;td&gt;" . $bran . "&lt;/td&gt;&lt;td&gt;" .  '&lt;a href="/web/printer%202/printer/admin/modsample.php?id='.$post['Model'].'"&gt;'.$post['Model'].'&lt;/a&gt;' . "&lt;/td&gt;&lt;td&gt;" . $off . "&lt;/td&gt;&lt;td&gt;" . $loc . "&lt;/td&gt;&lt;td&gt;" . $ip . "&lt;/td&gt;&lt;td&gt;" . $mac. "&lt;/td&gt;&lt;td&gt;" .  $Ink . "&lt;/td&gt;&lt;td&gt;" . $Stock . "&lt;/td&gt;&lt;td&gt;&lt;a href=\"delete.php?id=" . $id . "\"&gt;Delete&lt;/a&gt;&lt;br /&gt;&lt;a href=\"edit.php?id=" . $id . "\"&gt;Edit&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;";
}
}
}
</code></pre>

<p>Basically what I am trying to achive is when the printer.php page lists all the printers, when I click on the Model it will take me to a separate page for the particular Model</p>

<p>Thanks for your help</p>
