<?php
require 'middleware.php';

$data = json_decode(file_get_contents("php://input"), true);
$status = $data['status'];

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

echo json_encode(['success' => true]);
