prepare("DELETE FROM maintenance_requests WHERE id = ?"); $stmt->execute([$id]); header("Location: index.php?page=maintenance&success=Request deleted"); exit; } catch (PDOException $e) { header("Location: index.php?page=maintenance&error=Error deleting request"); exit; } } } else { // Redirect if not a POST request header("Location: index.php?page=maintenance"); exit; } ?>