1Server IP : 217.21.90.164 / Your IP : 216.73.216.51 Web Server : LiteSpeed System : Linux in-mum-web840.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64 User : u367232671 ( 367232671) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u367232671/domains/zeropaindentist.com/public_html/dbh/contactUs/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php if (!isset($_POST['contactSubmit'])) { header("Location: ./../../Login.php?MSG=Invalid Try to Login&MSG_C=danger&MSG_H=Invalid Acess"); } else { include './../conn.php'; $firstname = $_POST['first_name']; $lastname = $_POST['last_name']; $emailadd = $_POST['email_address']; $phone = $_POST['phone']; $message = $_POST['message']; $to = "zeropaindentist@gmail.com"; $subject = "Mail Form Website"; $name = $_REQUEST['name']; $email = $_REQUEST['email']; $number = $_REQUEST['number']; $treat = $_REQUEST['treat']; $msg = $_REQUEST['msg']; $message = " <html> <head> <title>HTML email</title> </head> <body> <table> <tr> <td><b>First Name</b></td> <td><b>:</b></td> <td>$firstname</td> </tr> <tr> <td><b>Last Name</b></td> <td><b>:</b></td> <td>$lastname</td> </tr> <tr> <td><b>Email</b></td> <td><b>:</b></td> <td>$emailadd</td> </tr> <tr> <td><b>Phone</b></td> <td><b>:</b></td> <td>$phone</td> </tr> <tr> <td><b>Message</b></td> <td><b>:</b></td> <td>$message</td> </tr> </table> </body> </html> "; // Always set content-type when sending HTML email $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; // More headers $headers .= 'From: noreply@zeropaindentist.com' . "\r\n"; // $headers .= 'Cc: myboss@example.com' . "\r\n"; mail($to, $subject, $message, $headers); $sql = "INSERT INTO contact_us (`firstName`,`lastName`, `email`, `phone`, `message`, `c_date`,`e_date`) VALUES ('$firstname','$lastname', '$email', '$phone', '$message',current_time(),current_time())"; $result = mysqli_query($conn, $sql); if ($result) { header("Location: ./../../contact.php?MSG=Contact Us Message Send Successful&MSG_C=success&MSG_H=Contact Us Successful"); } else { header("Location: ./../../contact.php?MSG=Contact Us Message Send Failed&MSG_C=danger&MSG_H=Contact Us Failed"); } }