|
Server IP : 145.79.210.100 / Your IP : 216.73.216.101 Web Server : LiteSpeed System : Linux in-mum-web1954.main-hosting.eu 5.14.0-570.26.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 16 09:12:04 EDT 2025 x86_64 User : u474798400 ( 474798400) PHP Version : 7.4.33 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u474798400/domains/excentia.in/public_html/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
include('phpmailer/class.phpmailer.php');
include('phpmailer/class.smtp.php');
include('admin/config.php');
$name=$_POST['name'];
$email=$_POST['email'];
$phone_no = $_POST['phone_no'];
$projects=$_POST['projects'];
$sql = mysqli_query($conn,"SELECT name FROM tbl_projects WHERE id = '$projects' ");
$projectName = mysqli_fetch_object($sql);
$mail= new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = "ssl"; // sets the prefix to the servier
$mail->Host = "smtp.hostinger.com"; // sets GMAIL as the SMTP server
$mail->Port = 465; // set the SMTP port
$mail->Username = "mail@excentia.in"; // GMAIL username
$mail->Password = "W@bsit#Mail99"; // GMAIL password
$mail->From = "mail@excentia.in";
$mail->FromName = "Excentia Project Enquiry Form";
$mail->Subject = "New Enquiry";
//$mail->Body = "This is the HTML message body <b>in bold!</b>";
$mail->AltBody = "Enquiry Details"; //Text Body
$mail->WordWrap = 50; // set word wrap
$mail->AddReplyTo($email,"Reply To");
$mail->AddAddress('info@excentia.in',"Project Enquiry Form");
//$mail->AddAddress('web@mayabious.com',"Project Enquiry Form");
$mail->IsHTML(true); // send as HTML
$mail->Body='<div style="width:700px; font-family:Arial; font-size:12px">
<div><br /><br /><br /><br />
Contact Us<br /><br />
<div>
<div style="width:75px; float: left;"><strong>Name:</strong></div>
<div style="float: left;">'.$name.'</div>
<div style="clear:both;"></div>
<div style="width:75px; float: left;"><strong>Email:</strong></div>
<div style="float: left;">'.$email.'</div>
<div style="clear:both;"></div>
<div style="width:75px; float: left;"><strong>Phone No:</strong></div>
<div style="float: left;">'.$phone_no.'</div>
<div style="clear:both;"></div>
<div style="width:75px; float: left;"><strong>Projects:</strong></div>
<div style="float: left;">'.$projectName->name.'</div>
</div>
</div>';
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
}
else{
echo 1;
$sql = "INSERT INTO tbl_project_contact_form_details(`pro_id`,`name`,`email`,`ph_no`) values ('$projects','$name','$email','$phone_no')";
mysqli_query($conn, $sql);
// if($result){
// echo 1;
// }
// else{
// echo 0;
// }
//echo '<span style="color:green;">Form Submitted Successfully. We will get back to you soon.';
}
//}
?>