볼 수 있었던 값을 업데이트하려고합니다. 그러나 아무것도 오류가있는 것 같지 않아 아무것도 업데이 트하는 것 같습니다. 아무도 나를 업데이 트하지 식별하는 데 도움이 될 수 있습니까? please내 데이터베이스로 업데이트하는 중 PHP에서 작동하지 않습니다.
<?php
// check for errors
ini_set('display_errors', 1);
//calls connection
require_once('connection.php');
//view first table
$ResultSets = getResults("members");
echo "<table border='1' cellpadding='6'>";
echo "<tr> <th>member_id</th> <th>first_name</th> <th>second_name</th> <th>Email</th> ";
foreach ($ResultSets as $record) {
echo "<form action=index.php method=post>";
echo "<tr>";
echo "<td>" . "<input type=text name=topic value =" . $record ['member_id'] . " </td>";
echo "<td>" . "<input type=text name=topic value =" . $record ['first_name'] . " </td>";
echo "<td>" . "<input type=text name=topic value =" . $record ['second_name'] . " </td>";
echo "<td>" . "<input type=text name=topic value =" . $record ['email'] . " </td>";
echo "<td>" . "<input type=hidden name=hidden value =" . $record ['member_id'] . " </td>";
//echo "</tr>";
echo "<input type=submit name=update value=Update>" . " </td>";
}
echo "<table>";
echo "</form>";
if (isset($_POST['update'])) {
$updateQuery = "UPDATE members SET first_name='$_POST[first_name]', second_name='$_POST[second_name]', email='$_POST[email]' WHERE member_id='$_POST[hidden]'";
mysql_query($updateQuery);
}
?>
당신은 확실히 당신은'$ _POST는 [ '업데이트']'정말 설정되어 있는지 업데이트 할 때? –