initial commit
This commit is contained in:
16
res/commentSub.php
Normal file
16
res/commentSub.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
require $_SERVER['DOCUMENT_ROOT']."/globalFuncs.php";
|
||||
conn();
|
||||
$pid = $_GET["post"];
|
||||
$uid = $current_user;
|
||||
$cmt = $_POST["comment"];
|
||||
$cmt = encodeUserLink($cmt, $uid, $pid);
|
||||
|
||||
$stmt = $conn->prepare("INSERT INTO comments (post_id, poster_id, text) VALUES (:pid, :uid, :cmt)");
|
||||
$stmt->bindParam(":pid", $pid);
|
||||
$stmt->bindParam(":uid", $uid);
|
||||
$stmt->bindParam(":cmt", $cmt);
|
||||
$result = $stmt->execute();
|
||||
|
||||
header("Location: /forum/post/?post=$pid#bottomOfComments");
|
||||
?>
|
||||
Reference in New Issue
Block a user