Hello. I only had a very quick look at the template script, but what you could to is get the while loop to write to a string and then send that string to the template ie
$tempstring = "";
while($newpm = mysql_fetch_assoc($newpmresult))
{
$tempstring .= "<tr>
<td class=\"newpm\">$</td>
<td class=\"newpm\">$newpm[title]</td>
<td class=\"newpm\">$newpm[author]</td>
<td class=\"newpm\">$newpm[date]</td>
</tr>
";
}
$tpl->parse(PAGECONTENT, $tempstring);
The last line of this code supposedly writes the string to the PAGECONTENT, which is then included in the outputted html page (from http://phpbuilder.com/columns/sascha19990316.php3?page=2). Since I haven't really properly look the template script, this may not be the best way to do it, but it seems like it will work.