I currently have this code use for printing a table in mysql database , but there's a problem, the print button is also shown when I print the table. Do you know of any alternative or even a vb.net code that will print what is currently on the web browser in vb.net(the one being dragged from the toolbox used to view web pages or php files).
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("hospital", $con);
$result = mysql_query("SELECT * FROM t2 WHERE NURSE='{$_POST["nurse"]}'");
echo "<font='2'><b>ST. CATHERINE HOSPITAL</br> </font>";
echo "<font='1'>CENTRAL EAST BANGAR LA UNION</b></font>";
echo "<table border='1'>
<tr>
<th>HospNum</th>
<th>RoomNum</th>
<th>LastName</th>
<th>FirstName</th>
<th>MidName</th>
<th>Address</th>
<th>TelNum</th>
<th>Nurse</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['HOSPNUM'] . "</td>";
echo "<td>" . $row['ROOMNUM'] . "</td>";
echo "<td>" . $row['LASTNAME'] . "</td>";
echo "<td>" . $row['FIRSTNAME'] . "</td>";
echo "<td>" . $row['MIDNAME'] . "</td>";
echo "<td>" . $row['ADDRESS'] . "</td>";
echo "<td>" . $row['TELNUM'] . "</td>";
echo "<td>" . $row['NURSE'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
?>
<form>
<input type="button" value="Print" onClick="window.print();" />
</form>