我建立了一个项目,想建立一个像Facebook这样的e评论系统,但是此代码对每个帖子发表评论,我犯了什么错误
<div class="cmtYou">
<form method="POST" action="">
<input type="text" name="cmnttxt" placeholder="Comment On This Post....">
<input type="submit" name="cmnt" value="Comment">
/form>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['cmnt'])) {
$status = $_POST['cmnttxt'];
$userid = session::get('id');
$postid = $result['id'];
if ($status == "") {
echo "Comment Cannnot be empty ";
}else{
$Update = "INSERT INTO comment (userid, postid, comment ) VALUES ('$userid','$postid', '$status')";
$Update_row = $db->insert($Update);
if ($Update_row) {