ok
Direktori : /home/importfo/public_html/facesdentalandcosmeticclinic.com/admin/ |
Current File : /home/importfo/public_html/facesdentalandcosmeticclinic.com/admin/inq.php |
<?php include("admin/config.php"); if(isset($_POST['submit'])) { error_reporting(0); $name=$_POST['name']; $email=$_POST['email']; $contact=$_POST['contact']; $msg=$_POST['msg']; date_default_timezone_set('Asia/Kolkata'); $currentTime = date( 'd-m-Y h:i:s A', time () ); // $sql="INSERT INTO `contact` (`name`, `email`, `contact`,`message`) VALUES ('$name','$email ','$contact',$msg')"; // $sql="INSERT INTO `contact`(`name`, `email`, `adate`,`atime`,`contact`,`select`, `message`) VALUES ('$name','$email','$adate','$atime','$contact','$services','$msg')"; // $sql="INSERT INTO `con` (`name`, `email`, `contact`, `message`) VALUES ('$name', '$email', '$contact', '$msg')"; $sql="INSERT INTO `complain_services` (`name`, `email`, `contact`,`msg`) VALUES ('$name','$email','$contact','$msg')"; $result=mysqli_query($db,$sql); if($result==1) { $mailto = "info@aryavhospital.com"; //My email address // $subject = "SVP Immigration Inquiry Detail"; //getting customer data $name = $_POST['name']; //getting customer name $email = $_POST['email']; //getting customer email $contact = $_POST['contact']; //getting customer Phome number $subject = $_POST['subject']; //getting subject line from client $message = $_POST['msg']; //getting subject line from client $subject2 = "Confirmation: Message was submitted successfully | HMA WebDesign"; // For customer confirmation //Email body I will receive $subject = "Parin Hospital Inquiry Detail"; $message = "Coustomer Name: " . $name . "\n" . "Phone Number: " . $contact . "\n" . "Coustomer Email: " .$email . "\n\n" . "Coustomer Message: " . "\n" . $_POST['message']; //Message for client confirmation $message2 = "Dear" . $name . "\n" . "Thank you for contacting us. We will get back to you shortly!" . "\n\n" . "You submitted the following message: " . "\n" . $_POST['message'] . "\n\n" . "Regards," . "\n" . ""; //Email headers $headers = "From: " . $email; // Client email, I will receive $headers2 = "From: " . $mailto; // This will receive client //PHP mailer function $result1 = mail($mailto, $subject, $message, $headers); // This email sent to My address $result2 = mail($fromEmail, $subject2, $message2, $headers2); //This confirmation email to client } //Checking if Mails sent successfully if ($result1 && $result2) { $success = "Your Message was sent Successfully!"; } else { $failed = "Sorry! Message was not sent, Try again Later."; } } header('Location: thank-you-page.php'); exit; ?>