// ======================================================================================= //
 // CHECK REQUIRED FIELD
 // ======================================================================================= //
 if (!isset($_POST['id'])) {
     throw new Exception('Error: Missing ID - Please go back and try again.');
 }
 // ======================================================================================= //
 // FILTER FORM DATA
 // ======================================================================================= //
 $reqID = filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT);
 $response = filter_input(INPUT_POST, 'response', FILTER_SANITIZE_STRING);
 // ========================================================================================
 // SPAM CHECK
 // ========================================================================================
 if ($_POST['permanganese'] == '' || !isset($_POST['permanganese'])) {
     $pdo = $connector->set_connection('facil2_pdo');
     // ========================================================================================
     // CHECK: HAS ALREADY RESPONDED?
     // ========================================================================================
     $sql1 = "SELECT date_of_response \n\t\tFROM request \n\t\tWHERE request_id = {$reqID}";
     $stmt1 = $pdo->query($sql1);
     $row1 = $stmt1->fetch(PDO::FETCH_ASSOC);
     $date_of_response = $row1['date_of_response'];
     if (!IS_NULL($row['date_of_response'])) {
         throw new Exception("This request was already processed and the notices were sent out.");
     }
     // ========================================================================================
     // UPDATE RECORD IN DATABASE
     // ========================================================================================
     $sql2 = "UPDATE request SET `date_of_response` = CURDATE(), `response` = '{$response}' WHERE request_id = {$reqID}";
     $stmt2 = $pdo->query($sql2);