File manager - Edit - /home/custbahd/bridgecounsellingcenter.com/forms/contact/index.php
Back
<?php session_start(); include_once('../../db/config.php'); if(isset($_POST['submit'])){ if($_POST['username'] != ''){ header('location: ../../'); } else { $name = mysqli_real_escape_string($mysqli, $_POST['name']); $email = addslashes(mysqli_real_escape_string($mysqli, $_POST['email'])); $phone = mysqli_real_escape_string($mysqli, $_POST['phone']); $subject = mysqli_real_escape_string($mysqli, $_POST['subject']); $message = mysqli_real_escape_string($mysqli, $_POST['message']); $sql = "INSERT INTO contact (name, email, phone, subject, message) VALUES ('$name', '$email', '$phone', '$subject', '$message')"; //use for MySQLi OOP if(mysqli_query($mysqli, $sql)){ echo "<div class='sent-message'>Message submitted successfully, we'll call you or reply via your email shortly!</div>"; } else{ echo "<div class='error-message'>Something went wrong while submitting your message, Try again!</div>"; } } } ?> <?php //To Client $conn= mysqli_connect("localhost", "custbahd_customassistname", "Rwatangabo1son", "custbahd_bridge"); use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\SMTP; use PHPMailer\PHPMailer\Exception; require_once __DIR__ . '/vendor/phpmailer/src/Exception.php'; require_once __DIR__ . '/vendor/phpmailer/src/PHPMailer.php'; require_once __DIR__ . '/vendor/phpmailer/src/SMTP.php'; $mail = new PHPMailer(true); $mail->SMTPDebug = 0; $mail->isSMTP(); $mail->Host = 'premium146.web-hosting.com'; $mail->SMTPAuth = true; $mail->Username = "info@bridgecounsellingcenter.com"; $mail->Password = "Bridge@256"; $mail->SMTPSecure = "ssl"; $mail->Port = 465; if(isset($_POST['submit'])){ if($_POST['username'] != ''){ $_SESSION['username'] = $_POST['username']; } else { $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $subject = $_POST['subject']; $message = $_POST['message']; $mail->From = "info@bridgecounsellingcenter.com"; $mail->FromName = "Bridge Counselling Center"; $mail->addAddress("$email"); $mail->isHTML(true); $mail->Subject = "Contact | Bridge Counselling Center"; $mail->Body = "<div align='center'> <table width='100%' cellpadding='0' cellspacing='0' border='0' style='background-image: url(https://bridgecounsellingcenter.com/assets/img/modal/card-header.png);background-position: top;background-size: cover;'> <tr class='logo'> <td style='padding-right: 0px;padding-left: 0px;' align='center'> <a href='https://bridgecounsellingcenter.com'><img align='center' border='0' src='https://bridgecounsellingcenter.com/assets/img/logo/3.png' alt='Bridge Counselling Center ©' title='Bridge Counselling Center ©' width='150px'></a> </td> </tr> <tr class='logo'> <td style='padding-right: 0px;padding-left: 0px;' align='center'> <h2 style='color: #338167;font-size: 18px;margin-bottom: 30px;text-transform: uppercase;'>Bridge Counselling Center</h2> </td> </tr> </table> <br> <br> <br> <br> <table style='margin-top:-40px;border-top: 1px solid #ececec;' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:4px 10px 10px;' align='left'> <div style='text-align: center;margin-top: 40px;'> <p style='font-size: 14px;'><span style='font-family: Cabin, sans-serif; line-height: 27.2px;'> <span style='font-size: 14px; line-height: 30.6px;'>Hey $name, thank you for contacting Bridge Counselling Center, we will get back to you as soon as possible via $email or $phone</span></span></p> <p style='font-size: 14px;'><span style='font-family: Cabin, sans-serif; line-height: 27.2px;'> <span style='font-size: 14px; line-height: 30.6px;text-transform: uppercase;font-weight: bold;'>If urgent, you can</span></span></p> </div> </td> </tr> </tbody> </table> <table width='100%' cellpadding='0' cellspacing='0' border='0' style='border-spacing: 0; border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;border-bottom: 1px solid #ececec;'><tr><td style='' align='center'><v:roundrect xmlns:v='urn:schemas-microsoft-com:vml' xmlns:w='urn:schemas-microsoft-com:office:word' href='' style='height:45px; v-text-anchor:middle; width:212px;' arcsize='9%' stroke='f' fillcolor='#34495e'><w:anchorlock/> <center style='color:#e3e0f0;'> <a href='mailto:info@bridgecounsellingcenter.com' target='_blank' style='box-sizing: border-box;display: inline-block;text-decoration: none;-webkit-text-size-adjust: none;text-align: center;color: #ffffff; font-weight: bold; background-color: #338167; border-radius: 4px;-webkit-border-radius: 4px; -moz-border-radius: 4px; width:auto; max-width:100%; overflow-wrap: break-word; word-break: break-word; word-wrap:break-word; mso-border-alt: none;margin-bottom: 20px;'> <span style='display:block;padding:13px 55px;'><span style='font-family: Cabin, sans-serif; font-size: 16px; line-height: 19.2px;'><span style='line-height: 19.2px; font-size: 16px;'>EMAIL US</span></span></span> </a> <a href='https://wa.me/256776744355?text=https://bridgecounsellingcenter.com %0D%0A %0D%0A *Whatsapp Support* %0D%0A %0D%0A *Lets Chat* %0D%0A %0D%0A' target='_blank' style='box-sizing: border-box;display: inline-block;text-decoration: none;-webkit-text-size-adjust: none;text-align: center;color: #ffffff; font-weight: bold; background-color: #338167; border-radius: 4px;-webkit-border-radius: 4px; -moz-border-radius: 4px; width:auto; max-width:100%; overflow-wrap: break-word; word-break: break-word; word-wrap:break-word; mso-border-alt: none;margin-bottom: 20px;'> <span style='display:block;padding:13px 35px;'><span style='font-family: Cabin, sans-serif; font-size: 16px; line-height: 19.2px;'><span style='line-height: 19.2px; font-size: 16px;'>WHATSAPP US</span></span></span> </a> <a href='tel:+256776744355' target='_blank' style='box-sizing: border-box;display: inline-block;text-decoration: none;-webkit-text-size-adjust: none;text-align: center;color: #ffffff; font-weight: bold; background-color: #338167; border-radius: 4px;-webkit-border-radius: 4px; -moz-border-radius: 4px; width:auto; max-width:100%; overflow-wrap: break-word; word-break: break-word; word-wrap:break-word; mso-border-alt: none;margin-bottom: 20px;'> <span style='display:block;padding:13px 60px;'><span style='font-family: Cabin, sans-serif; font-size: 16px; line-height: 19.2px;'><span style='line-height: 19.2px; font-size: 16px;'>CALL US</span></span></span> </a> </center> <center> <a href='https://bridgecounsellingcenter.com' style='display:block;padding:13px 60px; font-family: Cabin, sans-serif; font-size: 12px; line-height: 19.2px;color: black'>Go To Website</a> </center> </table> <br> <br> <br> <table style='background: #338167;' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='padding:44px 55px;'> <div class='lead' style='color: #ffffff; text-align: center;'> <img src='https://bridgecounsellingcenter.com/assets/img/about.jpg' alt='Mrs. Mugaga R.M Kakara' title='Mrs. Mugaga R.M Kakara - Therapist' style='width: 120px; height: 120px; border-radius: 100px; object-fit: cover; object-position: top;'> <p style='font-size: 14px;'><em><span style='font-family: Cabin, sans-serif; font-size: 18px; line-height: 30px;font-style: normal;'>Mrs. Mugaga R.M Kakara</span></em></p> <p style='font-size: 14px;'><em><span style='font-family: Cabin, sans-serif; font-size: 12px; line-height: 30px;font-style: normal;'>Therapist</span></em></p> <p style='font-size: 14px;'><strong><span style='font-family: Cabin, sans-serif; font-size: 18px; line-height: 30px;'>★ ★ ★ ★ ★</span></strong></p> <p style='font-size: 14px;'><em><span style='font-family: Cabin, sans-serif; font-size: 12px; line-height: 30px;'>'Overall, mental health is crucially important to living an abundant life and should be afforded the same care and attention to that of our physical health. The goal of counselling is to learn how to relieve and manage distress about any concern.'</span></em></p> </div> </td> </tr> </tbody> </table> <br> <br> <div style='background-image: url(https://bridgecounsellingcenter.com/assets/img/modal/card-header.png);background-position: bottom;background-size: cover;padding: 20px;'> <table border='0' cellspacing='0' cellpadding='0' width='100%' height='32' style='border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;margin-right: 0px;'> <tbody> <tr style='vertical-align: top;' align='center'> <td valign='middle' style='word-break: break-word;border-collapse: collapse !important;vertical-align: top'> <a href='https://facebook.com/bridgecounsellingcenter' target='_blank'> <img src='https://bridgecounsellingcenter.com/assets/img/icons/social/facebook.png' style='width:35px;border-radius: 100px;' alt='Facebook'> </a> </td> <td valign='middle' style='word-break: break-word;border-collapse: collapse !important;vertical-align: top'> <a href='https://twitter.com/bcc_256' target='_blank'> <img src='https://bridgecounsellingcenter.com/assets/img/icons/social/twitter.png' style='width:35px;border-radius: 100px;' alt='Twitter'> </a> </td> <td valign='middle' style='word-break: break-word;border-collapse: collapse !important;vertical-align: top'> <a href='https://instagram.com/bridgecounsellingcenter' target='_blank' style='color: #338167;font-size: 14px;'> <img src='https://bridgecounsellingcenter.com/assets/img/icons/social/instagram.png' style='width:35px;border-radius: 100px;' alt='Instagram'> </a> </td> <td valign='middle' style='word-break: break-word;border-collapse: collapse !important;vertical-align: top'> <a href='https://wa.me/256776744355?text=https://bridgecounsellingcenter.com %0D%0A %0D%0A Bridge Counselling Center %0D%0A %0D%0A *Lets Chat* %0D%0A %0D%0A' target='_blank'> <img src='https://bridgecounsellingcenter.com/assets/img/icons/social/whatsapp.jpg' style='width:35px;border-radius: 100px;' alt='Whatsapp'> </a> </td> </tr> </tbody></table> <br> <table role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:10px;' align='left'> <div style='color: #338167; line-height: 170%; text-align: center; word-wrap: break-word;'> <p style='font-size: 14px; line-height: 170%;'><a href='https://bridgecounsellingcenter.com' style='text-decoration: none; color: gray;'>https://bridgecounsellingcenter.com</a></p> <p style='font-size: 14px; line-height: 170%;'> <a href='mailto:info@bridgecounsellingcenter.com' style='text-decoration: none; color: gray;'>info@bridgecounsellingcenter.com</a></p> <p style='font-size: 14px; line-height: 170%;'><a href='https://maps.app.goo.gl/x9TiabV4zSwwwYU1A' style='text-decoration: none; color: gray;'>Plot 26, Hancock Road | Ntinda, Nakawa</a></p> </div> </td> </tr> </tbody> </table> <table style='' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:10px;' align='left'> <div style='line-height: 170%; text-align: center; word-wrap: break-word;font-size: 12px;color: gray;'> <p style='font-weight: bold;color: #338167;'> Bridge Counselling Center © <script>document.write(new Date().getFullYear());</script></p> <p> Powered by <a href='https://customassistinc.com/' target='_blank' style='color: gray;'>Custom Assist Inc.</a></p> </div> </td> </tr> </tbody> </table> </div> </div>"; try { $mail->send(); echo ""; } catch (Exception $e) { echo "Mailer Error: " . $mail->ErrorInfo; } } } ?> <?php //To Admin $mail = new PHPMailer(true); $mail->SMTPDebug = 0; $mail->isSMTP(); $mail->Host = 'premium146.web-hosting.com'; $mail->SMTPAuth = true; $mail->Username = "info@bridgecounsellingcenter.com"; $mail->Password = "Bridge@256"; $mail->SMTPSecure = "ssl"; $mail->Port = 465; if(isset($_POST['submit'])){ if($_POST['username'] != ''){ $_SESSION['username'] = $_POST['username']; } else { $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $subject = $_POST['subject']; $message = $_POST['message']; $mail->From = "info@bridgecounsellingcenter.com"; $mail->FromName = "Bridge Counselling Center"; $mail->addAddress("info@bridgecounsellingcenter.com"); $mail->isHTML(true); $mail->Subject = "Message | Bridge Counselling Center"; $mail->Body = "<div align='center'> <table width='100%' cellpadding='0' cellspacing='0' border='0' style='background-image: url(https://bridgecounsellingcenter.com/assets/img/modal/card-header.png);background-position: top;background-size: cover;'> <tr class='logo'> <td style='padding-right: 0px;padding-left: 0px;' align='center'> <a href='https://bridgecounsellingcenter.com'><img align='center' border='0' src='https://bridgecounsellingcenter.com/assets/img/logo/3.png' alt='Bridge Counselling Center ©' title='Bridge Counselling Center ©' width='150px'></a> </td> </tr> <tr class='logo'> <td style='padding-right: 0px;padding-left: 0px;' align='center'> <h2 style='color: #338167;font-size: 18px;margin-bottom: 30px;text-transform: uppercase;'>Bridge Counselling Center</h2> </td> </tr> </table> <br> <br> <br> <br> <table style='margin-top:-40px;border-top: 1px solid #ececec;' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:4px 10px 10px;' align='left'> <div style='text-align: center;margin-top: 40px;'> <p style='font-size: 14px;'><span style='font-family: Cabin, sans-serif; line-height: 27.2px;'> <span style='font-size: 14px; line-height: 30.6px;'>Contact message from $name</span></span></p> <p style='font-size: 14px;'><span style='font-family: Cabin, sans-serif; line-height: 27.2px;'> <span style='font-size: 14px; line-height: 30.6px;'><b>Subject: </b>$subject</span></span></p> <p style='font-size: 14px;'><span style='font-family: Cabin, sans-serif; line-height: 27.2px;'> <span style='font-size: 14px; line-height: 30.6px;'><b>Message: </b>$message</span></span></p> <p style='font-size: 14px;'><span style='font-family: Cabin, sans-serif; line-height: 27.2px;'> <span style='font-size: 14px; line-height: 30.6px;text-transform: uppercase;font-weight: bold;'>For a quick reply</span></span></p> </div> </td> </tr> </tbody> </table> <table width='100%' cellpadding='0' cellspacing='0' border='0' style='border-spacing: 0; border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;border-bottom: 1px solid #ececec;'><tr><td style='' align='center'><v:roundrect xmlns:v='urn:schemas-microsoft-com:vml' xmlns:w='urn:schemas-microsoft-com:office:word' href='' style='height:45px; v-text-anchor:middle; width:212px;' arcsize='9%' stroke='f' fillcolor='#34495e'><w:anchorlock/> <center style='color:#e3e0f0;'> <a href='mailto:$email' target='_blank' style='box-sizing: border-box;display: inline-block;text-decoration: none;-webkit-text-size-adjust: none;text-align: center;color: #ffffff; font-weight: bold; background-color: #338167; border-radius: 4px;-webkit-border-radius: 4px; -moz-border-radius: 4px; width:auto; max-width:100%; overflow-wrap: break-word; word-break: break-word; word-wrap:break-word; mso-border-alt: none;margin-bottom: 20px;'> <span style='display:block;padding:13px 55px;'><span style='font-family: Cabin, sans-serif; font-size: 16px; line-height: 19.2px;'><span style='line-height: 19.2px; font-size: 16px;'>EMAIL SENDER</span></span></span> </a> <a href='https://wa.me/$phone?text=https://bridgecounsellingcenter.com %0D%0A %0D%0A *Whatsapp Support* %0D%0A %0D%0A' target='_blank' style='box-sizing: border-box;display: inline-block;text-decoration: none;-webkit-text-size-adjust: none;text-align: center;color: #ffffff; font-weight: bold; background-color: #338167; border-radius: 4px;-webkit-border-radius: 4px; -moz-border-radius: 4px; width:auto; max-width:100%; overflow-wrap: break-word; word-break: break-word; word-wrap:break-word; mso-border-alt: none;margin-bottom: 20px;'> <span style='display:block;padding:13px 35px;'><span style='font-family: Cabin, sans-serif; font-size: 16px; line-height: 19.2px;'><span style='line-height: 19.2px; font-size: 16px;'>WHATSAPP SENDER</span></span></span> </a> <a href='tel:$phone' target='_blank' style='box-sizing: border-box;display: inline-block;text-decoration: none;-webkit-text-size-adjust: none;text-align: center;color: #ffffff; font-weight: bold; background-color: #338167; border-radius: 4px;-webkit-border-radius: 4px; -moz-border-radius: 4px; width:auto; max-width:100%; overflow-wrap: break-word; word-break: break-word; word-wrap:break-word; mso-border-alt: none;margin-bottom: 20px;'> <span style='display:block;padding:13px 60px;'><span style='font-family: Cabin, sans-serif; font-size: 16px; line-height: 19.2px;'><span style='line-height: 19.2px; font-size: 16px;'>CALL SENDER</span></span></span> </a> </center> <center> <span style='display:block;padding:13px 60px; font-family: Cabin, sans-serif; font-size: 12px; line-height: 19.2px;color: black'>Source: Website</span> </center> </table> <br> <br> <br> <div style='background-image: url(https://bridgecounsellingcenter.com/assets/img/modal/card-header.png);background-position: bottom;background-size: cover;padding: 20px;'> <table border='0' cellspacing='0' cellpadding='0' width='100%' height='32' style='border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;margin-right: 0px;'> <tbody> <tr style='vertical-align: top;' align='center'> <td valign='middle' style='word-break: break-word;border-collapse: collapse !important;vertical-align: top'> <a href='https://facebook.com/bridgecounsellingcenter' target='_blank'> <img src='https://bridgecounsellingcenter.com/assets/img/icons/social/facebook.png' style='width:35px;border-radius: 100px;' alt='Facebook'> </a> </td> <td valign='middle' style='word-break: break-word;border-collapse: collapse !important;vertical-align: top'> <a href='https://twitter.com/bcc_256' target='_blank'> <img src='https://bridgecounsellingcenter.com/assets/img/icons/social/twitter.png' style='width:35px;border-radius: 100px;' alt='Twitter'> </a> </td> <td valign='middle' style='word-break: break-word;border-collapse: collapse !important;vertical-align: top'> <a href='https://instagram.com/bridgecounsellingcenter' target='_blank' style='color: #338167;font-size: 14px;'> <img src='https://bridgecounsellingcenter.com/assets/img/icons/social/instagram.png' style='width:35px;border-radius: 100px;' alt='Instagram'> </a> </td> <td valign='middle' style='word-break: break-word;border-collapse: collapse !important;vertical-align: top'> <a href='https://wa.me/256776744355?text=https://bridgecounsellingcenter.com %0D%0A %0D%0A Bridge Counselling Center %0D%0A %0D%0A *Lets Chat* %0D%0A %0D%0A' target='_blank'> <img src='https://bridgecounsellingcenter.com/assets/img/icons/social/whatsapp.jpg' style='width:35px;border-radius: 100px;' alt='Whatsapp'> </a> </td> </tr> </tbody></table> <br> <table role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:10px;' align='left'> <div style='color: #338167; line-height: 170%; text-align: center; word-wrap: break-word;'> <p style='font-size: 14px; line-height: 170%;'><a href='https://bridgecounsellingcenter.com' style='text-decoration: none; color: gray;'>https://bridgecounsellingcenter.com</a></p> <p style='font-size: 14px; line-height: 170%;'> <a href='mailto:info@bridgecounsellingcenter.com' style='text-decoration: none; color: gray;'>info@bridgecounsellingcenter.com</a></p> <p style='font-size: 14px; line-height: 170%;'><a href='https://maps.app.goo.gl/x9TiabV4zSwwwYU1A' style='text-decoration: none; color: gray;'>Plot 26, Hancock Road | Ntinda, Nakawa</a></p> </div> </td> </tr> </tbody> </table> <table style='' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:10px;' align='left'> <div style='line-height: 170%; text-align: center; word-wrap: break-word;font-size: 12px;color: gray;'> <p style='font-weight: bold;color: #338167;'> Bridge Counselling Center © <script>document.write(new Date().getFullYear());</script></p> <p> Powered by <a href='https://customassistinc.com/' target='_blank' style='color: gray;'>Custom Assist Inc.</a></p> </div> </td> </tr> </tbody> </table> </div> </div>"; try { $mail->send(); echo ""; } catch (Exception $e) { echo "Mailer Error: " . $mail->ErrorInfo; } } } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 2.21 |
proxy
|
phpinfo
|
Settings