Update: 2026-06-11 18:22:57
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
include "../connect.php";
|
||||
|
||||
// Retrieve and sanitize input parameters
|
||||
$driverId = filterRequest("driverId");
|
||||
$notes = filterRequest("notes");
|
||||
|
||||
|
||||
// SQL query to insert a new note into the notesForDriverService table
|
||||
$sql = "INSERT INTO `welcomeDriverCall`( `driverId`, `isCall`, `notes`) VALUES ('$driverId','1','$notes')";
|
||||
|
||||
// Prepare the SQL statement
|
||||
$stmt = $con->prepare($sql);
|
||||
|
||||
|
||||
$stmt->execute();
|
||||
|
||||
if ($stmt->rowCount() > 0) {
|
||||
// Print a success message
|
||||
printSuccess($message = "note inserted successfully");
|
||||
} else {
|
||||
// Print a failure message
|
||||
printFailure($message = "Failed to insert note");
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user