service 2
This commit is contained in:
10
serviceapp/check_db.php
Normal file
10
serviceapp/check_db.php
Normal 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()]);
|
||||||
|
}
|
||||||
@@ -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([
|
||||||
|
|||||||
Reference in New Issue
Block a user