Update: 2026-06-11 18:22:57
This commit is contained in:
28
walletintaleq.intaleq.xyz/v2/main/auth/sms/getSender.php
Normal file
28
walletintaleq.intaleq.xyz/v2/main/auth/sms/getSender.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
include "../../connect.php";
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT
|
||||
*
|
||||
FROM
|
||||
`smsSender`
|
||||
WHERE
|
||||
id = '1'";
|
||||
|
||||
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->execute();
|
||||
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($stmt->rowCount() > 0) {
|
||||
|
||||
printSuccess($data = $result);
|
||||
} else {
|
||||
|
||||
|
||||
printFailure($message = "No driver order data found");
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
// Include the database connection file
|
||||
include "../../connect.php";
|
||||
|
||||
// Filter and validate the phone number input
|
||||
$phone_number = filterRequest("phone_number");
|
||||
|
||||
// Prepare the SQL query using a parameterized query to prevent SQL injection
|
||||
$sql = "UPDATE phone_verification SET is_verified = 1 WHERE phone_number = :phone_number";
|
||||
|
||||
// Prepare the statement
|
||||
$stmt = $con->prepare($sql);
|
||||
|
||||
// Bind the phone number parameter
|
||||
$stmt->bindParam(":phone_number", $phone_number);
|
||||
|
||||
// Execute the query
|
||||
$stmt->execute();
|
||||
|
||||
// Get the number of affected rows
|
||||
$affectedRows = $stmt->rowCount();
|
||||
|
||||
// Check if the update was successful
|
||||
if ($affectedRows > 0) {
|
||||
// Return a success response
|
||||
printSuccess($data = ["message" => "Phone number verified successfully"]);
|
||||
} else {
|
||||
// Return a failure response
|
||||
printFailure($message = "No phone number found or verification failed");
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
// Include the database connection file
|
||||
include "../../connect.php";
|
||||
|
||||
// Filter and validate the phone number input
|
||||
$phone_number = filterRequest("phone_number");
|
||||
|
||||
// Prepare the SQL query using a parameterized query to prevent SQL injection
|
||||
$sql = "UPDATE phone_verification_passenger SET verified = 1 WHERE phone_number = :phone_number";
|
||||
|
||||
// Prepare the statement
|
||||
$stmt = $con->prepare($sql);
|
||||
|
||||
// Bind the phone number parameter
|
||||
$stmt->bindParam(":phone_number", $phone_number);
|
||||
|
||||
// Execute the query
|
||||
$stmt->execute();
|
||||
|
||||
// Get the number of affected rows
|
||||
$affectedRows = $stmt->rowCount();
|
||||
|
||||
// Check if the update was successful
|
||||
if ($affectedRows > 0) {
|
||||
// Return a success response
|
||||
printSuccess($data = ["message" => "Phone number verified successfully"]);
|
||||
} else {
|
||||
// Return a failure response
|
||||
printFailure($message = "No phone number found or verification failed");
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user