Joywork/ajax/addComplaint.php
2026-05-22 21:21:54 +03:00

8 lines
302 B
PHP

<?php
require_once($_SERVER['DOCUMENT_ROOT']."/config.php");
if($_SESSION['id']) {
$post = clearInputData($_POST);
$sql = "INSERT INTO complaints(reason, txt, id_obj, date_add, id_user) VALUES('$post[reason]', '$post[complaint_text]', '$post[id_obj]', NOW(), '$_SESSION[id]')";
mysql_query($sql);
}