Hi
First of all I moved the query out of the table to the beginning (with all of the other queries), then the code for the table/form was
echo "<form action=\"process.php\" method=\"POST\" >
<td width=\"50\" align=\"left\"> {$row2[0]}</td>
<td width=\"2\"> / </td>
<td width=\"150\" align=\"left\"> {$row2[1]}</td>
<td width=\"2\" align=\"left\"><input type=\"hidden\" name=\"MRef[]\" value=\"{$row2[2]}\"></td>
<td width=\"2\" align=\"left\"></td>
<td width=\"200\" align=\"right\"> $row3[1]   </td>
<td width=\"2\" align=\"left\"><input type=\"hidden\" name=\"PreviousMonth[]\" value=\"{$row3[2]}\"></td>
<td width=\"200\" align=\"left\"> <input type=\"text\" name=\"ThisMonth[]\"></td>
<td width=\"200\" align=\"right\"><select name=\"user\"><option value = \"'.$value.'\">$value</option>
<option selected></option>";
foreach($User as $value)
{
printf("<option>".$value."</option>");
}
echo "</select></td>";
This displays everything OK and the drop down box works fine
HOWEVER !!!
I don't know if you can help, but I get a wierd thing when it comes to collecting the output from this select field in the form......
In the drop down box there are 2 options; John Lennon or Andy Pandy.
There are 2 rows in the input table, in the first row I select Andy Pandy, in the second row I select John Lennon.
When it outputs the data (either testing the variables in the process form code or looking in the database) for the first row it outputs 'a' for the second row 'n'.... The first 2 letters of Andy, no john lennon at all?
Likewise if I put John Lennon int he first row, Andy Pandy in the second - I get 'j' then 'o'...........
Any idea what is going on?
thanks