Gazelle/sections/questions/take_edit_answer.php

19 lines
376 B
PHP
Raw Normal View History

2013-10-21 08:01:00 +00:00
<?
authorize();
$ID = $_POST['id'];
$UserID = $_POST['userid'];
$Answer = db_string($_POST['edit']);
if (empty($Answer) || !is_number($ID) || $UserID != $LoggedUser['ID']) {
error(403);
}
2013-10-22 08:01:07 +00:00
$DB->query("
UPDATE staff_answers
SET Answer = '$Answer'
WHERE QuestionID = '$ID'
AND UserID = '$UserID'");
2013-10-21 08:01:00 +00:00
2013-10-22 08:01:07 +00:00
header("Location: questions.php?action=view_answers&userid=$UserID");