<?php
error_reporting(E_ERROR);
$username="corey";
$password="41945549";
$database="controls";

mysql_connect('127.0.0.1',$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query = "(SELECT * FROM milling ORDER BY id DESC LIMIT 1)"; 
$result=mysql_query($query);

$num=mysql_numrows($result);

mysql_close();
?>

<?php
$i=0;
while ($i < $num) {

$f21=mysql_result($result,$i,"mill1lvl");
$f22=mysql_result($result,$i,"mill2lvl");
$f23=mysql_result($result,$i,"mill3lvl");
$f24=mysql_result($result,$i,"mill4lvl");
$f25=mysql_result($result,$i,"mill5lvl");
$f26=mysql_result($result,$i,"mill6lvl");
$f38=mysql_result($result,$i,"mill1spd");
$f33=mysql_result($result,$i,"mill2spd");
$f34=mysql_result($result,$i,"mill3spd");
$f35=mysql_result($result,$i,"mill4spd");
$f36=mysql_result($result,$i,"mill5spd");
$f37=mysql_result($result,$i,"mill6spd");
$f15=mysql_result($result,$i,"netablwt");
$f2=mysql_result($result,$i,"mainspd");
$f5=mysql_result($result,$i,"mccoutput");
$f79=mysql_result($result,$i,"mill1output");
$f110=mysql_result($result,$i,"dmbeltrunning");
$f111=mysql_result($result,$i,"tdbeltscale");
$f112=mysql_result($result,$i,"tdbeltscaleonoff");
$f113=mysql_result($result,$i,"syrupoverflow");
$f114=mysql_result($result,$i,"molbreclvl");
$f115=mysql_result($result,$i,"syruprcvrlvl");
$f116=mysql_result($result,$i,"amollvl");
$f117=mysql_result($result,$i,"amoloverflow");
$f118=mysql_result($result,$i,"bmoloverflow");
?>
<table width="100%">
<tr>
<td width="50%">
<table class="tftable1">
<tr>
<td width="50%" align="center" colspan="5" border="0"><font color="#00BFFF"><i>BOILERS</i></font></td>
</tr>
</table>
<table class="tftableBOILERS"> 
<tr height="30">
			<td align="center"><font color="#e0e0e0">BOILER 1</font></td>
			<td align="center"><font color="#e0e0e0">Steam Flow</font></td>
			<td align="right"><font color="#00FF00"><?php echo $f38; ?></font></td>
			<td align="left"><font color="#e0e0e0">KPPH</font></td>
			
</tr>
<tr height="30">
			<td align="center"><font color="#e0e0e0">BOILER 2</font></td>
			<td align="center"><font color="#e0e0e0">Steam Flow</font></td>
			<td align="right"><font color="#00FF00"><?php echo $f38; ?></font></td>
			<td align="left"><font color="#e0e0e0">KPPH</font></td>
			
</tr>
<tr height="30">
			<td align="center"><font color="#e0e0e0">BOILER 3</font></td>
			<td align="center"><font color="#e0e0e0">Steam Flow</font></td>
			<td align="right"><font color="#00FF00"><?php echo $f38; ?></font></td>
			<td align="left"><font color="#e0e0e0">KPPH</font></td>
			
</tr>
<tr height="30">
			<td align="center"><font color="#e0e0e0">BOILER 4</font></td>
			<td align="center"><font color="#e0e0e0">Steam Flow</font></td>
			<td align="right"><font color="#00FF00"><?php echo $f38; ?></font></td>
			<td align="left"><font color="#e0e0e0">KPPH</font></td>
			
</tr>
<tr height="30">
			<td align="center"><font color="#e0e0e0">BOILER 5</font></td>
			<td align="center"><font color="#e0e0e0">Steam Flow</font></td>
			<td align="right"><font color="#00FF00"><?php echo $f38; ?></font></td>
			<td align="left"><font color="#e0e0e0">KPPH</font></td>
			
</tr>
<tr height="30">
			<td align="center"><font color="#e0e0e0">BOILER 6</font></td>
			<td align="center"><font color="#e0e0e0">Steam Flow</font></td>
			<td align="right"><font color="#00FF00"><?php echo $f38; ?></font></td>
			<td align="left"><font color="#e0e0e0">KPPH</font></td>
			
</tr>
<tr height="30">
			<td align="center"><font color="#e0e0e0">BOILER 7</font></td>
			<td align="center"><font color="#e0e0e0">Steam Flow</font></td>
			<td align="right"><font color="#00FF00"><?php echo $f38; ?></font></td>
			<td align="left"><font color="#e0e0e0">KPPH</font></td>
			
</tr>
<tr height="30">
			<td align="center"><font color="#e0e0e0">BOILER 8</font></td>
			<td align="center"><font color="#e0e0e0">Steam Flow</font></td>
			<td align="right"><font color="#00FF00"><?php echo $f38; ?></font></td>
			<td align="left"><font color="#e0e0e0">KPPH</font></td>
			
</tr>
<tr>
			
</tr>
</table>
</td>

<td width="50%">
<table class="tftable1">
<tr>
<td width="50%" align="center" colspan="6" border="0"><font color="#00BFFF"><i>TANK LEVELS</i></font></td>
</tr>
</table>
<table class="tftableLEVELS"> 
<tr>
			<td align="left"><font color="#e0e0e0">SYRUP RCVR LVL</font></td>
			<td width="70" align="right"><font color="#00FF00"></font></td>
			<td align="left"><progress max="100" value=""></progress></td>	
</tr>
<tr>
			<td align="left"><font color="#e0e0e0">SYRUP OVERFLOW LVL</font></td>
			<td align="right"><font color="#00FF00"></font></td>		
			<td align="left"><progress max="100" value=""></progress></td>				
</tr>
<tr>			
			<td align="left"><font color="#e0e0e0">TOTAL SYRUP LVL</font></td>
			<td align="right"><font color="#00FF00"></font></td>	
			<td align="left"><progress max="100" value=""></progress></td>
</tr>
<tr>			
			<td align="left"><font color="#e0e0e0">A MOLASSES RCVR LVL</font></td>
			<td align="right"><font color="#00FF00"></font></td>		
			<td align="left"><progress max="100" value=""></progress></td>
</tr>
<tr>			
			<td align="left"><font color="#e0e0e0">A MOLASSES OVERFLOW LVL</font></td>			
			<td align="right"><font color="#00FF00"></font></td>	
			<td align="left"><progress max="100" value=""></progress></td>
</tr>
<tr>			
			<td align="left"><font color="#e0e0e0">B MOLASSES RCVR LVL</font></td>			
			<td align="right"><font color="#00FF00"></font></td>	
			<td align="left"><progress max="100" value=""></progress></td>
</tr>
<tr>			
			<td align="left"><font color="#e0e0e0">B MOLASSES OVERFLOW LVL</font></td>			
			<td align="right"><font color="#00FF00"></font></td>	
			<td align="left"><progress max="100" value=""></progress></td>	
</tr>
<tr>			
			<td width="140" colspan="3" bgcolor="#000000" align="center"><font color="#e0e0e0"></font></td>				
</tr>
<tr>
			
</tr>
</table>
</td>
</tr>
</table>
<?php
$i++;
}
?>