set_charset ('utf8');
$thread = $_GET['thread'];
$id = $_GET['id'];
$pass = $_GET['pass'];
if ($result = $mysqli -> query ("
SELECT
pass, image
FROM
responses
WHERE
(thread_id = {$_GET['thread']}) AND (response_id = {$_GET['id']})")):
$row = $result -> fetch_assoc ();
if ($_GET['pass'] == $row['pass']):
$mysqli -> query ("
UPDATE
responses
SET
deleted = 1
WHERE
(thread_id = $thread) AND (response_id = $id)");
echo "消しましたぁ!!
";
else:
echo '残念.
削除用パスワードが違います.';
endif;
echo "
5 秒後に元のページに戻ります.
戻らない場合はこちら";
endif;