这是代码。
$result = mysql_query("SELECT * FROM situations");
echo "<table border='1'>
<tr>
<th>Case#</th>
<th>Cop(s)</th>
<th>Code</th>
<th>Vehicle/Person</th>
<th>Location</th>
<th>Division(s)</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<form action=situations.php method=post>";
echo "<tr>";
echo "<td>" . $row['Case#'] . " </td>";
echo "<td>" . "<input type=text name=cop value=" . $row['Cops']. " </td>";
echo "<td>" . "<input type=text name=sector value=". $row['Code'] . " </td>";
echo "<td>" . "<input type=text name=vehicle value=" . $row['Vehicle'] ." </td>";
echo "<td>" . "<input type=text name=location value=" .$row['Location']. " </td>";
echo "<td>" . "<input type=text name=division value=" .$row['Division']. " </td>";
echo "<td>" . "<input type=hidden name=hidden value=" .$row['Case #'] . " </td>";
echo "<td>" . "<input type=submit name=update_situations value=Update" . " </td>";
echo "</tr>";
echo "</form>";
}
echo "</table>";
我有它,所以我可以更新它,但我的数据没有完全显示。EX:我会在位置上有“Dukes Blvd”,但它只会显示“Dukes”,请帮忙!我是 PHP、MySQL 的新手。