home/aissorg/public_html/rooms-mail.php 0000644 00000012014 15116221574 0014237 0 ustar 00 prepare($sql);
$stmt->bind_param("i", $bookingId);
$stmt->execute();
$result = $stmt->get_result();
$row = $result->fetch_assoc();
$stmt->close();
if (!$row) {
die("Booking not found.");
}
// 📁 Path to your LOCAL LOGO — MUST EXIST on your server
$localLogoPath = __DIR__ . '/img/logo.png';
// Check if logo exists
if (!file_exists($localLogoPath)) {
die("Logo file NOT FOUND at:
" . $localLogoPath);
}
// HTML content for email and PDF
$htmlContent = '
Dear ' . htmlspecialchars($row['name']) . ',
Thank you for your room booking. Here are your reservation details:
| Name: | ' . $row['name'] . ' |
| Mobile: | ' . $row['mobile'] . ' |
| Email: | ' . $row['email'] . ' |
| Check-In Date: | ' . $row['checkin_date'] . ' |
| Check-Out Date: | ' . $row['checkout_date'] . ' |
| Rooms: | ' . $row['rooms'] . ' |
| Adults: | ' . $row['adult'] . ' |
| Kids: | ' . $row['kids'] . ' |
| Aadhar No: | ' . $row['aadhar'] . ' |
| Address: | ' . $row['address'] . ', ' . $row['city'] . ', ' . $row['state'] . ', ' . $row['country'] . ' - ' . $row['zip_code'] . ' |
| Purpose: | ' . $row['purpose'] . ' |