D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
G:
/
PleskVhosts
/
jhalakdembla.com
/
akkonlineservices.com
/
Filename :
inquire.php
back
Copy
<?php $title="AKK Online Services | Send Your Query | Herbal Products | Ayurvedic Products"; include('layout/header.php'); require('Admin/Coding/db.php'); $id = $_GET['id']; $query = "SELECT *,productcategory.Title AS CtgTitle FROM `productcategory` INNER JOIN `product` ON productcategory.id = product.ProductCtgId OR '0' = product.ProductCtgId where product.id = '$id'"; $result = mysqli_query($conn,$query); $row = mysqli_fetch_assoc($result); $msgs=""; if(isset($_POST['addData'])){ $title = $_POST['title']; $name = $_POST['name']; $email = $_POST['email']; $msg = $_POST['msg']; $to = "moverandpacker.shop@gmail.com"; $subject = "Product Inquiry : ".$title; $message = $msg; $message .= "<br/>Name: $name <br/> <br/> <b>Email: $email</b>"; $header = "From:medioverseasabd@gmail.com \r\n"; $header .= "MIME-Version: 1.0\r\n"; $header .= "Content-type: text/html\r\n"; $retval = mail ($to,$subject,$message,$header); if( $retval == true ) { $msgs= "Message sent successfully..."; }else { $msgs= "Message could not be sent..."; } } ?> <section style="margin-top:50px; margin-bottom:150px;"> <div class="col-lg-6" style="margin: 0px auto; "> <?php if (isset($msgs) && $msgs != "") { ?> <div class="alert " role="alert" style="background: grey;color: white;"> <?php echo $msgs;?> </div> <?php } ?> <h4>Inquiry Form</h4> <div class="mt-5" style="margin:20px 0px;"> <b>Product Name : <?php echo $row['Title'];?></b> </div> <form method="post" action=""> <input type="hidden" name="title" value="<?php echo $row['Title'];?>" /> <div class="mb-3 checkout__input "> <label for="exampleInputEmail1" class="form-label">Name</label> <input type="text" name="name" id="exampleInputEmail1" placeholder="Enter Name" required> </div> <div class="mb-3 checkout__input "> <label for="exampleInputEmail1" class="form-label">Email </label> <input type="email" class="form-control" name="email" id="exampleInputEmail1" placeholder="Enter Email" required> </div> <div class="mb-3 checkout__input "> <label for="exampleInputMEssage" class="form-label">Message </label> <input type="text" class="form-control" name="msg" id="exampleInputMEssage" placeholder="Enter Message" required> </div> <button class="btn " name="addData" style="border: solid 1px black;" >Submit</button> </form> </div> </section> <?php include('layout/footer.php'); ?>