有人可以帮我修复此代码,以便选中的复选框将采用可变行号的值。我不关心它作为一个数组工作,直到我能先得到这个基本的代码行。谢谢。
echo "<table>";
echo "<h2>FILMS : </h2>";
echo "<table border='1' style='border-collapse: collapse;border-color: silver;'>";
echo "<tr style='font-weight: bold;'>";
echo "
<td width='20' align='center'>#</td>
<td width='20' align='center'>ID</td>
<td width='200' align='center'>TITLE</td>
<td width='200' align='center'>ROLE</td>
<td width='200' align='center'>DIRECTOR</td>";
echo "</tr>";
while ($row = mysql_fetch_array($result)) {
$id_actor= $row["id_actor"];
$idfilm= $row["idfilm"];
$filmTitle= $row["filmTitle"];
$filmRole= $row["filmRole"];
$filmDirector= $row["filmDirector"];
//Here's the Problem
echo"<tr>";
echo '<td><input name="checkbox[]"
value="id_actor" //POST a value that equals a variable row selected?
type="checkbox"
id="checkbox[]" /></td>';
for ($i=0; $i<5; $i++)
{
echo"<td> $row[$i]</td>";
}
echo"</tr>";
}
echo"</table>";