title: How to make echo results in table hyperlinks
body: <p>I have retrieved data from DB and inserted into a html table however I want to     make each value in the table a hyperlink to another page. Below I have tried making the     pupil_id and link to a profile.php but all pupil_id values have now vanished!</p>
  
  <pre><code>(if (!isset($_POST['search'])) {
                      $pupils = mysql_query("SELECT * FROM pupil") or die("Cant find         Pupils");
                      $count = mysql_num_rows($pupils);
                      if ($count == 0) {
                          $totalpupil = "There are currently no Pupils in the system.";
                      } else {
                          while ($row = mysql_fetch_array($pupils)) {
                              ?&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;&lt;?php echo '&lt;a href="profile.php?id=' .$row['pupil_id'] . '"&lt;/a&gt;' ?&gt;&lt;/td&gt;
                                  &lt;td&gt;&lt;?php echo $row['pupil_name'] ?&gt;&lt;/td&gt;
                                  &lt;td&gt;&lt;?php echo $row['class_id'] ?&gt;&lt;/td&gt;                        
                              &lt;/tr&gt;
                              &lt;?php
                          }
                      }
                  })
  </code></pre>
  
  <p>The finishing table should display every hyperlink as a hyperlink to another page.  Any help?</p>