23 lines
561 B
PHP
23 lines
561 B
PHP
<?php
|
|
include "../../connect.php";
|
|
|
|
$driverID = filterRequest("driverID");
|
|
|
|
if (empty($driverID)) {
|
|
printFailure("Driver ID is required");
|
|
exit;
|
|
}
|
|
|
|
$sql = "UPDATE `payments` SET `isGiven`='Paid' WHERE driverID = :driverID";
|
|
|
|
$stmt = $con->prepare($sql);
|
|
$stmt->execute([':driverID' => $driverID]);
|
|
|
|
if ($stmt->rowCount() > 0) {
|
|
// Print a success message
|
|
printSuccess($message = "Payment data updated successfully");
|
|
} else {
|
|
// Print a failure message
|
|
printFailure($message = "Failed to update payment data");
|
|
}
|
|
?>
|