service 2

This commit is contained in:
Hamza-Ayed
2026-05-02 14:34:52 +03:00
parent ed5c51a5e5
commit 02a16f0ca0
2 changed files with 13 additions and 2 deletions

10
serviceapp/check_db.php Normal file
View File

@@ -0,0 +1,10 @@
<?php
require_once __DIR__ . '/../connect.php';
try {
$stmt = $con->prepare("DESCRIBE users");
$stmt->execute();
$columns = $stmt->fetchAll(PDO::FETCH_ASSOC);
echo json_encode($columns);
} catch (Exception $e) {
echo json_encode(['error' => $e->getMessage()]);
}

View File

@@ -48,8 +48,9 @@ try {
$encFp = $encryptionHelper->encryptData($fingerprint); $encFp = $encryptionHelper->encryptData($fingerprint);
// 3. الإدخال في قاعدة البيانات (الحالة الافتراضية هي 0 أو pending) // 3. الإدخال في قاعدة البيانات (الحالة الافتراضية هي 0 أو pending)
$sql = "INSERT INTO users (id, first_name, last_name, email, phone, password, fingerprint, fingerprint_hash, user_type, status, created_at) $sql = "INSERT INTO users (id, first_name, last_name, email, phone, password, fingerprint, fingerprint_hash, user_type, created_at)
VALUES (:id, :fname, :lname, :email, :phone, :pass, :fp, :fp_hash, 'service', 0, NOW())"; VALUES (:id, :fname, :lname, :email, :phone, :pass, :fp, :fp_hash, 'service', NOW())";
$stmt = $con->prepare($sql); $stmt = $con->prepare($sql);
$stmt->execute([ $stmt->execute([