diff --git a/backend/test_add_driver_and_car.php b/backend/test_add_driver_and_car.php index 24884d4a..a56e4d25 100644 --- a/backend/test_add_driver_and_car.php +++ b/backend/test_add_driver_and_car.php @@ -15,6 +15,15 @@ require_once __DIR__ . '/core/bootstrap.php'; header('Content-Type: application/json; charset=utf-8'); +// دعم JSON body بالإضافة إلى POST/GET +$rawBody = file_get_contents('php://input'); +if ($rawBody) { + $json = json_decode($rawBody, true); + if ($json) { + $_POST = array_merge($_POST, $json); + } +} + try { /* ================== قراءة المدخلات ================== */ $phone = filterRequest('phone');