mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-14 03:16:25 +00:00
14 lines
369 B
PHP
14 lines
369 B
PHP
|
<?
|
||
|
authorize();
|
||
|
|
||
|
$ID = $_POST['id'];
|
||
|
$UserID = $_POST['userid'];
|
||
|
$Answer = db_string($_POST['edit']);
|
||
|
|
||
|
if (empty($Answer) || !is_number($ID) || $UserID != $LoggedUser['ID']) {
|
||
|
error(403);
|
||
|
}
|
||
|
|
||
|
$DB->query("UPDATE staff_answers SET Answer = '$Answer' WHERE QuestionID = '$ID' AND UserID = '$UserID'");
|
||
|
|
||
|
header("Location: questions.php?action=view_answers&userid=$UserID");
|