encryptData($phone); // SQL query to insert into notesForPassengerService $sql = "INSERT INTO `notesForPassengerService` (`phone`, `note`, `editor`) VALUES (:phone, :note, :editor)"; // Prepare the statement $stmt = $con->prepare($sql); $stmt->bindParam(':phone', $encryptedPhone); $stmt->bindParam(':note', $note); $stmt->bindParam(':editor', $editor); // Execute and respond $stmt->execute(); if ($stmt->rowCount() > 0) { jsonSuccess(null, "Note inserted successfully"); } else { jsonError("Failed to insert note"); } ?>