bunny1
03-08-2007, 11:11 PM
My code below displays data from the database in a table.
Im finding it hard to change the font of the data in the table.
Where can i do this? When i add a font tag just after the <table> tag and the closing tag before the </table> tag i get errors??
thanks
<?php echo "<table border='1'>
<tr>
<th>Product Code</th>
<th>Name</th>
<th>Product Type</th>
<th>Picture</th>
<th>Description</th>
<th>Stock</th>
<th>Price</th>
</tr>";
while($row = @mysql_fetch_array($result))
{
if ($row['Department'] == $var)
{
echo "<tr>";
//echo "<td>" . $row['Department'] . "</td>";
echo "<td>" . $row['Prod_code'] . "</td>";
echo "<td>" . $row['Name'] . "</td>";
echo "<td>" . $row['Prod_Type'] . "</td>";
echo "<td><img height = 50 width = 50 src = " . $row['Picture'] . "></td>";
echo "<td>" . $row['Description'] . "</td>";
echo "<td>" . $row['Stock'] . "</td>";
echo "<td>" . $row['Price'] . "</td>";
echo "</tr>";
}
}
echo "</table>";mysql_close($con);
?>
Im finding it hard to change the font of the data in the table.
Where can i do this? When i add a font tag just after the <table> tag and the closing tag before the </table> tag i get errors??
thanks
<?php echo "<table border='1'>
<tr>
<th>Product Code</th>
<th>Name</th>
<th>Product Type</th>
<th>Picture</th>
<th>Description</th>
<th>Stock</th>
<th>Price</th>
</tr>";
while($row = @mysql_fetch_array($result))
{
if ($row['Department'] == $var)
{
echo "<tr>";
//echo "<td>" . $row['Department'] . "</td>";
echo "<td>" . $row['Prod_code'] . "</td>";
echo "<td>" . $row['Name'] . "</td>";
echo "<td>" . $row['Prod_Type'] . "</td>";
echo "<td><img height = 50 width = 50 src = " . $row['Picture'] . "></td>";
echo "<td>" . $row['Description'] . "</td>";
echo "<td>" . $row['Stock'] . "</td>";
echo "<td>" . $row['Price'] . "</td>";
echo "</tr>";
}
}
echo "</table>";mysql_close($con);
?>