<?php
require 'middleware.php';

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

$pdo->prepare("
UPDATE bookings
SET status='accepted'
WHERE id=? AND driver_id=?
")->execute([$booking_id, $driver_id]);

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