<?php
include 'config/db.php';
require 'check_admin.php';
$id = $_POST['id'];
$status = $_POST['status'];

$pdo->prepare("UPDATE orders SET status = ? WHERE id = ?")
    ->execute([$status, $id]);

header("Location: orders.php");
exit;