How can I get this to work?
I have it on my view page and it works great, but I need to be able to print it from the print pages, as we can then select a lot of lines and select print selected?
Any ideas please?
Cheers
global $conn;
$sql = "select Title from material where job_no='".postvalue("editid1")."'";
$rs = db_query($sql,$conn);
$data = db_fetch_array($rs);
if(!$data)
return;
echo "<table>";
while(1)
{
echo "<tr>";
foreach($data as $v)
{
echo "<td>";
echo htmlspecialchars($v);
echo "</td>";
}
echo "</tr>";
if(!($data = db_fetch_array($rs)))
break;
}
echo "</table>";