first commit

This commit is contained in:
Hamza-Ayed
2026-06-09 08:40:31 +03:00
commit d8901e1a87
3161 changed files with 536187 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
<?php
require_once __DIR__ . '/../../connect.php';
// جلب البيانات من الطلب
$driver_name = filterRequest("driver_name");
$national_id = filterRequest("national_id");
$birth_date = filterRequest("birth_date");
$license_type = filterRequest("license_type");
$phone = filterRequest("phone");
$site = filterRequest("site");
// إعداد استعلام آمن باستخدام bind parameters
$sql = "INSERT INTO `driversWantWork`(
`driver_name`,
`phone`,
`national_id`,
`birth_date`,
`license_type`,
`site`
) VALUES (
:driver_name,
:phone,
:national_id,
:birth_date,
:license_type,
:site
)";
$stmt = $con->prepare($sql);
// ربط القيم
$stmt->bindParam(':driver_name', $driver_name);
$stmt->bindParam(':phone', $phone);
$stmt->bindParam(':national_id', $national_id);
$stmt->bindParam(':birth_date', $birth_date);
$stmt->bindParam(':license_type', $license_type);
$stmt->bindParam(':site', $site);
// تنفيذ الاستعلام
if ($stmt->execute()) {
jsonSuccess(null, "Driver data saved successfully");
} else {
jsonError("Failed to save driver data");
}
?>