prepare($stmt); $sql->bindParam(':uuid', $_POST['rid']); $sql->execute(); } catch (PDOException $e) { $new_ticket_alert = array("danger", "Failed to close request: " . $e->getMessage()); } header('Location: /', true); } } else { $new_ticket_alert = array("danger", "You are not authorised to close this request."); header('Location: /view?rid=' . $request['uuid'], true); } ?>