Server IP : 162.214.80.37 / Your IP : 216.73.216.83 Web Server : Apache System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : imyrqtmy ( 2189) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0750) : /home2/imyrqtmy/public_html/digitrendzing/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php error_reporting(E_ALL & ~E_WARNING); extract($_POST); $html_message = '<h1>New Enquriy Details.</h1>'; $html_message .= '<p>Name : '. $_POST['name'] .'</p>'; $html_message .= '<p>Contact number :'.$_POST['phone'].'</p>'; $html_message .= '<p>Email : '. $_POST['email'] .'</p>'; $html_message .= '<p>Website Url :'.$_POST['url'].'</p>'; $html_message .= '<p>Website Enquiry :'.$_POST['enq'].'</p>'; $html_message .= '<p>Message :'.$_POST['msg'].'</p>'; // $to ="bestlaundry64@gmail.com" ; // $subject = "Enquriy us"; // $header = "MIME-Version: 1.0\r\n"; // $header .= "Content-type: text/html\r\n"; // $retval = mail ($to,$subject,$html_message,$header); // if( $retval == true ) { // echo "<script>; // alert('Mail Send Succesfully'); // window.location.href='index.php'; // </script>"; // }else { // echo "<script>; // alert('Mail Not Send Properly '); // window.location.href='index.php'; // </script>"; // } $to = "bestlaundry64@gmail.com"; $subject = "Enquiry us"; $header = "MIME-Version: 1.0\r\n"; $header .= "Content-type: text/html\r\n"; $html_message = "<html><body><h1>This is a test email</h1><p>Thank you for your enquiry!</p></body></html>"; $retval = mail($to, $subject, $html_message, $header); if ($retval == true) { // Trigger the modal for successful mail using JavaScript echo "<script> var myModal = new bootstrap.Modal(document.getElementById('thankYouModal'), {}); myModal.show(); </script>"; } else { // If mail failed, show an alert and redirect to index.php // echo "<script> // alert('Mail Not Sent Properly'); // window.location.href='index.php'; // </script>"; echo "<script> var myModal = new bootstrap.Modal(document.getElementById('thankYouModal'), {}); myModal.show(); </script>"; } ?> <div class="modal fade modal-fullscreen-sm-down" id="thankYouModal" tabindex="-1" aria-labelledby="thankYouModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="thankYouModalLabel">Thank You</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <h1>Thank You</h1> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary" onclick="redirectToIndex()">Close</button> </div> </div> </div> </div> <script> function redirectToIndex() { window.location.href = 'index.php'; } </script>