PHP Table Format
<p>I've put together the following code which creates a table upon a selection being made with a drop down menu.</p>

<pre><code>echo "&lt;table&gt;";
$result=mysql_query($query);
while($rows=mysql_fetch_array($result)){
echo "&lt;tr&gt;";
echo "&lt;th&gt;Find Name:&lt;/th&gt;";
echo "&lt;th&gt;Find Description:&lt;/th&gt;";
echo "&lt;/tr&gt;";
echo "&lt;tr&gt;";
echo "&lt;td&gt;".$rows['findname']."&lt;/td&gt;";
echo "&lt;td&gt;".$rows['finddescription']."&lt;/td&gt;";
echo "&lt;/tr&gt;";
}
echo "&lt;/table&gt;";
</code></pre>

<p>The problem I've got is that for each record that is returned the 'headers' are repeated. The live page can be found <a href="http://www.mapmyfinds.co.uk/development/ajaxfunction.php" rel="nofollow">here</a>. I just wonder whether someone could perhaps take a look at this please and tell me where I've gone wrong.</p>

<p>Apologies for the really simple question, but I've been looking at this for a while and I just can't find the answer. I think it just needs a fresh pair of eyes to look at it.</p>
