0
$row['post_topic']
が実際に返信ページのIDを渡すのに問題があります。私がIDを手動で入力すると、例えば '2'のように、それは絶対にうまく動作します。
echo '<form method="post" action="reply.php?id=' .$row['post_topic']. '">
<textarea name="reply-content"></textarea>
<input type="submit" value="Replyy" />
</form>';
編集
余分なノートで、私は同じファイルを持っているのWhileループの1つ内側echo $row['post_topic'];
作品。
問合せ:
$sql= "SELECT
posts.post_topic,
posts.post_content,
posts.post_date,
posts.post_by,
users.user_id,
users.user_name
FROM
posts
LEFT JOIN
users
ON
posts.post_by = users.user_id
WHERE
posts.post_topic =
'" .mysqli_real_escape_string($connect, $_GET['id']). "'";
はPHP:
$row = $resultpost->fetch_assoc();
echo $row['post_topic'];
echo '<br><table border="0"';
echo '<tr>';
echo '<th>';
echo '<form method="post" action="reply.php?id='.$row['post_topic']. '">
<textarea name="reply-content"></textarea>
<input type="submit" value="Reply" />
</form>';
echo '</th>';
echo '</tr>';
これは十分な情報ではありません。 $ rowはどこから来たのか、クエリは何か、DBには何が入っていますか? – Adder
'echo $ row ['post_topic'];'あなたに何か? – AbraCadaver
投稿に追加情報を追加しました。 – doogiedrew