echo "<form action='recent.php' method='post' enctype='multipart/form-data'>";
echo "<table id='logs' border='1' cellspacing='0' width='62%'>";
echo "<tr>";
echo "<th width='15%'>Time Logged</th>";
echo "<th width='15%'>Username</th>";
echo "<th width='15%'>Password</th>";
echo "<th width='15%'>IP Address</th>";
echo "<th width='2%'><a href=\"#\" onclick=\"checkAll(this);\">Mark</a></th>";
echo "<th width='2%'>Delete</th>";
echo "</tr>";
while ($row = mysql_fetch_row($result))
{
echo "<tr>";
echo ("<p><td>$row[2]</td><td>$row[0]</td><td>$row[1]</td><td><i>$row[3]</i></td><td><center><input type=\"checkbox\" name=\"mark[]\" value=\"$row[0]\" id=\"$row[0]\"></center></td><td><a href=\"delete.php?time=$row[2]&user=$row[0]&pass=$row[1]&ip=$row[3]\"><center>[x]</center></a></td></p>");
echo "</tr>";
}
echo "</table>";
echo "</form>";
チェックボックス<input type=\"checkbox\" name=\"mark[]\" value=\"$row[0]\" id=\"$row[0]\">
をエコーないそれから私はがチェックチェックボックス
if ($_GET['mark']) {
foreach ($_GET['mark'] as $mark) {
echo "<li>$mark</li>";
}
}
を持っている。しかし、それは、任意の確認のチェックボックスが表示されません。また、を閉じる前に入れようとしましたが、</form>
の結果をエコーしませんでした。私は間違って何をしていますか?
属性を確認したらどういう意味ですか? – Kyle
彼はあなたのフォームmethod = POSTを意味し、あなたは$ _GETのスーパーグローバルを探しています。 $ _POSTを調べる必要があります。 – rayman86
私の以前の答えを無視して、私は今編集しました。私はあなたが最初からチェックを入れて入力を表示しようとしていると思っていました。私はあなたの質問を理解し、あなたの問題を見つけました。 –