Originally Posted by
Iain
Vini, copy the HTML from the source for the table cell with the bar in it, we can't tell anything from an image
apologies
PHP Code:
<html>
<head><title>Projects</title>
<style type="text/css">
cell {
background: #f0f0f0;
font: 12px normal Verdana, Arial, sans-serif;}
th#tableheader, tr#tableheader {
background: #3F789A;
border: 1px solid #000000;
font: 12px normal Verdana, Arial, sans-serif;
font-weight: bold;
color: #ffffff;}
td#tabledata {
border: 1px solid #000000;
font: 12px normal Verdana, Arial, sans-serif;
color: #336699;}
.percentBar {
height: 5px;
background: #c0c0c0;
}
</style>
</head>
<body bgcolor="#f0f0f0">
<?
$DBhost = 'localhost';
$DBuser = 'vini';
$DBpass = 'gumpy307';
$DBName = 'projects';
$table = 'projects';
mysql_connect($DBhost,$DBuser,$DBpass) or die('Unable to connect to database');
@mysql_select_db($DBName) or die('Unable to select database '.$DBName);
$sqlquery = "SELECT * FROM $table ORDER BY project";
$result = mysql_query($sqlquery);
if (mysql_num_rows($result) < 1)
{
echo '<center><p>There Were No Results for Your Search</center>';
} else {
echo '<div class=contact><table width="535" align="center">';
echo '<tr>
<th id="tableheader">Project</th><th colspan="2" width="200" id="tableheader">Progress</th><th id="tableheader">Status</th><th id="tableheader">Proposed End</th>';
while ($row = mysql_fetch_array($result))
{
echo'<tr><td id="tabledata"><b>'.$row['project'].'</b></td>
<td id="tabledata"><div class="percentBar" width="'.$row['percent'].'px"> </div></td>
<td align="center" id="tabledata" width="30"><b>'.$row['percent'].'%</b></td>
<td align="center" id="tabledata"><b>'.$row['status'].'</b></td>
<td align="center" id="tabledata"><b>'.$row['day'].'/'.$row['month'].'/'.$row['year'].'</b></td>
</tr>';
}
echo '</table></div>';
}
?>
<br><br>
</body></html>