lol, yeah, if you don't need a to use the $Value variable, it pointless creating a for-loop (in this case anyhow).
Here is how I see it you should have the query to return all sections:
SELECT s.SectionId, m.TypeRef, m.SerialNo, m.MachineId, m.ClicksList FROM tblMachine m, tblSection s WHERE s.ClientRef='$ClientRef' AND m.ClientRef='$ClientRef'
That way, look like this:
<?php
$query = "SELECT `ClientRef` FROM `tblUser` WHERE `CLogIn` = '$username'";
$result2 = mysql_query($query)
or die (mysql_error());
$row2 = mysql_fetch_array($result2);
$ClientRef = $row2["ClientRef"];
// This is my code
$query="SELECT s.SectionId, m.TypeRef, m.SerialNo, m.MachineId, m.ClicksList
FROM tblMachine m, tblSection s
WHERE s.ClientRef='$ClientRef' AND m.ClientRef='$ClientRef'";
$result=mysql_query($query);
// You code again
echo' <form action="process_readings.php" method="POST">
<table align="centre" cellspacing="0" cellpadding="0">
<tr>
<td align="left"></td>
<td align="left"><b>Section</b></td>
<td align="left"><b>Type Ref</b></td>
<td align="left"><b>Serial Number</b></td>
<td align="left"><b>Location</b></td>
<td align="right"><b>Code</b></td>
<td align="left"></td>
<td align="left"><b>Meter Readings</b></td>
<td align="left"></td>
<td align="left"></td>
</tr>';
// My loop
while($row = mysql_fetch_array($result,MYSQL_NUM))
{
// This is all your code now
echo "<tr><font face=\"Arial, Helvetica, sans-serif\">
<td width=\"10\" align=\"left\"> <input type=\"hidden\" name=\"ClicksList\" value\"{$row11[4]}\"> </td>
<td width=\"70\" align=\"left\"> {$row11[0]}</td>
<td width=\"120\" align=\"left\"> {$row11[1]}</td>
<td width=\"200\" align=\"left\"> {$row11[2]}</td>
<td width=\"30\" align=\"right\"> {$row11[3]} </td> ";
if ($row[4] == 1)
{
echo "<td width=\"10\" align=\"left\"> {$row11[7]} <input type=\"text\" name=\"MachineId[]\" size=\"3\"></td>
<td width=\"200\" align=\"left\"> {$row11[5]} BW <input type=\"text\" name=\"BWClicks[]\"></td>
<td width=\"300\" align=\"left\"><input type=\"hidden\" name=\"CClicks[]\" value\"{NULL}\"></td><br> ";
}
else
{
echo "<td width=\"1\" align=\"left\"> {$row11[7]} <input type=\"text\" name=\"MachineId[]\" size=\"3\"></td>
<td width=\"200\" align=\"left\"> {$row11[5]} BW <input type=\"text\" name=\"BWClicks[]\"> </td>
<td width=\"300\" align=\"left\"> {$row11[6]} Colour <input type=\"text\" name=\"CClicks[]\"></td><br> ";
}
echo "</font></tr>\n";
} //close while loop
echo '</table>';
echo "<br><p align=\"center\"><input type=\"submit\" name=\"submit\" value=\"Submit\"> ";
echo '</form>';
?>
(completely untested, like most of my posts)
Note: Consider using syntax indention. When I begun coding, I was lazy and didn't do it - now I hate code which is not indented. Start from an early stage learning good practices and you will be better faster.