File manager - Edit - /home/webapp68.cm.in.th/u68319090016/app/public/comment.php
Back
<?php include("../config/db.php"); if(!isset($_SESSION['user_id'])) header("Location: login.php"); $article_id=intval($_POST['article_id']); $user_id=$_SESSION['user_id']; $comment=trim($_POST['comment']); if($comment){ $stmt=$conn->prepare("INSERT INTO comments (article_id,user_id,content) VALUES (?,?,?)"); $stmt->bind_param("iis",$article_id,$user_id,$comment); $stmt->execute(); } header("Location: article.php?id=$article_id"); exit; ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.45 |
proxy
|
phpinfo
|
Settings