admin 9
This commit is contained in:
@@ -7,18 +7,14 @@ $phone = filterRequest("phone");
|
||||
// Encrypt phone
|
||||
$encphone = $encryptionHelper->encryptData($phone);
|
||||
|
||||
$sql = "SELECT
|
||||
*
|
||||
FROM
|
||||
`driver`
|
||||
WHERE
|
||||
phone = :encPhone";
|
||||
error_log("[GIFT_CHECK] Received Phone: " . $phone);
|
||||
error_log("[GIFT_CHECK] Encrypted Phone: " . $encphone);
|
||||
|
||||
$sql = "SELECT * FROM `driver` WHERE phone = :encPhone OR phone = :rawPhone";
|
||||
|
||||
$stmt = $con->prepare($sql);
|
||||
|
||||
// FIX 1: Bind AFTER preparing the statement
|
||||
// FIX 2: Use the same placeholder name (:encPhone)
|
||||
$stmt->bindParam(':encPhone', $encphone, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':rawPhone', $phone, PDO::PARAM_STR);
|
||||
|
||||
$stmt->execute();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user