qna/send.php
2024-12-09 11:32:56 -05:00

30 lines
No EOL
482 B
PHP

<?php
include 'config.php';
if ($_GET["text"] === null || $_GET["public"] === null) {
exit();
}
if ($_GET["cw"] === null) {
$iscw = False;
} else {
$iscw = True;
}
$curTime = date("Y-m-d h:i:sP");
$dataArray = array(
"text" => $_GET["text"],
"cw" => $_GET["cw"],
"iscwed" => $iscw,
"time" => $curTime,
"ispublic" => $_GET["public"],
"isrespondedto" => False
);
pg_insert($db, "data", $dataArray);
header("Location: index.php?sent=1");
?>