show lead name in notifications

This commit is contained in:
Suvodip
2024-08-17 18:42:50 +05:30
parent e643b06cc1
commit 0b92a5797e
3 changed files with 5 additions and 3 deletions

View File

@@ -489,12 +489,13 @@
try {
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $conn->prepare("INSERT INTO appointment (appt_date, email, name, leadid, comment) VALUES (:appt_date, :email, :name, :leadid, :comment)");
$stmt = $conn->prepare("INSERT INTO appointment (appt_date, email, name, leadid, comment, lead_name) VALUES (:appt_date, :email, :name, :leadid, :comment, :lead_name)");
$stmt->bindParam(':appt_date', $_POST['appt_date']);
$stmt->bindParam(':email', $_SESSION['email']);
$stmt->bindParam(':name', $_SESSION['name']);
$stmt->bindParam(':leadid', $_GET['id']);
$stmt->bindParam(':comment', $_POST['comment']);
$stmt->bindParam(':lead_name', $_POST['lead_name']);
$stmt->execute();
$saved_message = "New Appointment save successfully";
} catch(PDOException $e) {
@@ -694,6 +695,7 @@
<label for="appt_date">Appointment Date</label>
<input type="datetime-local" name="appt_date" id="appt_date" style="border: 1px solid #D9D9D9; border-radius: 5px; padding: 6px;" />
</div>
<input type="text" name="lead_name" id="lead_name" value="<?php echo $usersNameforSendMessage; ?>">
<div class="flex flex-col">
<label for="appt-comment">Description (if needed)</label>
<input type="text" name="comment" id="appt-comment" style="border: 1px solid #D9D9D9; border-radius: 5px; padding: 6px;" />