blob: 131627dcd63a45a283bd0d53785dc2fc8425f688 [file] [log] [blame]
<?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");
?>