<?php | |
require '../credentials.php'; | |
require 'utils.php'; | |
require_once("security.php"); | |
$victimid = (int)$_POST["victim-id"]; | |
$killerid = (int)$_POST["killer-id"]; | |
$msgcontent = mysqli_real_escape_string($conn, $_POST["msg-content"]); | |
$template = "INSERT INTO `missatges` (`id`, `sender_id`, `receiver_id`, `timestamp`, `content`) VALUES (NULL, $killerid, $victimid, CURRENT_TIMESTAMP, '$msgcontent')"; | |
if (!query($template)) die("An error ocurred." . $template); | |
header("Location: /main.php"); | |
?> |