Actually, you want the value of the input to be just "$classroom".  That is
because it is within the while loop.  Can I ask for a little more
information regarding the structure of the table that you are querying--what
is(are) the primary keys in the table; I am assuming that the "week_no"
field is the primary key.  I am sorry for the confusion--the complete code
for outputting the input form follows (minus the appropriate form tags).

###SNIP####
echo "<table>";
while ($row = mysql_fetch_array($result)) {
 $week_no = $row['week_no'];
 $week_date = $row['week_date'];
 $parent_id = $row['parent_id'];
 $student_id = $row['student_id'];
 $class_id = $row['class_id'];
 $classroom = $row['classroom'];
 $homework = $row['homework'];
 $library = $row['library'];
 $fieldtrip = $row['fieldtrip'];
 $pta = $row['pta'];
 $mast = $row['mast'];
 $meetings = $row['meetings'];
 $other = $row['other'];

 echo <<<EOD
<tr><td align=\"center\">
  <input type=\"text\" name=\"log[$week_no][classroom]\"
value=\"$classroom\">
</td></tr>
EOD;

}
echo "</table><";
###SNIP####


> -----Original Message-----
> From: John Hughes, Jomari Works [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 11, 2002 11:03 PM
> To: Shrock, Court; [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Creating an array of mySQL results with PHP
> 
> 
> OK. I can see how that works, assuming that the value would be
> \"log[$week_no][classroom]\" as well.
> 
> What would the mysql_fetch_array look like?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to