File manager - Edit - /home/asiatechinc/public_html/asiatech-websites/voyagerhotel.in/Lake-Loft/bookking-mail.php
Back
<?php if(isset($_POST['submit'])) { $to = "rohit.negi.195@gmail.com"; // CHANGE THIS $subject = "Hotel Lake Loft New Room Booking Enquiry "; $full_name = htmlspecialchars($_POST['full_name']); $phone = htmlspecialchars($_POST['phone']); $email = htmlspecialchars($_POST['email']); $room_type = htmlspecialchars($_POST['room_type']); $checkin = htmlspecialchars($_POST['checkin']); $checkout = htmlspecialchars($_POST['checkout']); $guests = htmlspecialchars($_POST['guests']); $rooms = htmlspecialchars($_POST['rooms']); $message = nl2br(htmlspecialchars($_POST['message'])); $body = ' <html> <head> <style> body { font-family: Arial, Helvetica, sans-serif; background: #f4f6f8; padding: 20px; } .mail-container { max-width: 650px; margin: auto; background: #ffffff; padding: 20px; border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,0.1); } h2 { text-align: center; color: #333; margin-bottom: 20px; } table { width: 100%; border-collapse: collapse; } td { padding: 10px; border: 1px solid #ddd; font-size: 14px; } td.label { background: #f0f2f5; font-weight: bold; width: 35%; } </style> </head> <body> <div class="mail-container"> <h2>New Booking Request</h2> <table> <tr> <td class="label">Full Name</td> <td>'.$full_name.'</td> </tr> <tr> <td class="label">Phone Number</td> <td>'.$phone.'</td> </tr> <tr> <td class="label">Email Address</td> <td>'.$email.'</td> </tr> <tr> <td class="label">Room Type</td> <td>'.$room_type.'</td> </tr> <tr> <td class="label">Check-in Date</td> <td>'.$checkin.'</td> </tr> <tr> <td class="label">Check-out Date</td> <td>'.$checkout.'</td> </tr> <tr> <td class="label">Guests</td> <td>'.$guests.'</td> </tr> <tr> <td class="label">Rooms</td> <td>'.$rooms.'</td> </tr> <tr> <td class="label">Special Requests</td> <td>'.$message.'</td> </tr> </table> </div> </body> </html> '; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type:text/html;charset=UTF-8\r\n"; $headers .= "From: Booking Enquiry <no-reply@yourdomain.com>\r\n"; $headers .= "Reply-To: $email\r\n"; if(mail($to, $subject, $body, $headers)) { echo "<script>alert('Booking request sent successfully!'); window.history.back();</script>"; } else { echo "<script>alert('Failed to send booking request. Please try again.'); window.history.back();</script>"; } } ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings