ok

Mini Shell

Direktori : /home2/selectio/public_html/sqarextechnologies.com/
Upload File :
Current File : /home2/selectio/public_html/sqarextechnologies.com/contact-form.php

 <?php include 'header1.php';?>
 <style>
     textarea, textarea.form-control {
    height: 150px;
}
 </style>
 <?php
if(isset($_POST['add_news'])){
        try{
            
            $name=$_POST['name'];
    	    $email = filter_var($_POST['email'], FILTER_SANITIZE_EMAIL);
            $phone=$_POST['mobile_number'];
            $message=$_POST['message'];
            error_log($email);
            
            
    if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
        echo '<script>alert("Invalid email format")</script>';
        exit; // Stop script execution
    }
    
    
            $to = "info@sqarextechnologies.com"; 
            $header = "";
     $subject = "Contact Us";
     $header .= "Name : ".$name."\r\n";
     $header .= "Email : ".$email."\r\n";
     $header .= "Phone Number : ".$phone."\r\n";
     $header .= "Message :".$message."\r\n";
     
     
     $retval = mail ($to,$subject,$header);
     
     if( $retval == true ) {
         header("location: index.php");
         echo '<script>alert("Thank you for reaching out! Your inquiry is important to us. Please wait patiently, and our dedicated team will get in touch with you within the next 24 hours. We appreciate your understanding and look forward to assisting you soon.")</script>'; 
     }else{
                 echo '<script>alert("Message could not be sent...")</script>';
                 
     } 
            
    
  
             
        }catch(Exception $e){
            $error=$e;
        }   
    }

?> 
<section class="wptb-contact-wrapper overflow-hidden">
                <div class="container">
                    <div class="wptb-contact-inner">
                        <div class="wptb-particle--one">
                            <img src="assets/img/contact/contact02.png" alt="">
                        </div>
                        <div class="wptb-particle--two">
                            <img src="assets/img/contact/contact01.png" alt="">
                        </div>

                        <div class="wptb-contact-form-wrapper">
                            <div class="wptb-heading">
                                <div class="wptb-heading--inner text-center">
                                    <div class="wptb-heading--subtitle light wow fadeInUp">Get In Touch</div>
                                    <h2 class="wptb-heading--title light wow fadeInUp">Fill the form to contact us</h2>
                                </div>
                            </div>

                            <form class="contact-form light" action="" method="post">
                                <div class="row">
                                    <div class="col-lg-6 mb-3">
                                        <div class="form-group">
                                            <label>Name</label>
                                            <input type="text" name="name" class="form-control" placeholder="Enter your full name" required="" style="height: 50px;">
                                        </div>
                                    </div>
                                    <div class="col-lg-6 mb-3">
                                        <div class="form-group">
                                            <label>Mobile Number</label>
                                            <input type="number" name="mobile_number" class="form-control" placeholder="Enter your number" required=""style="height: 50px;">
                                        </div>
                                    </div>
                                    <div class="col-md-12 col-lg-12 mb-3">
                                        <div class="form-group">
                                            <label>Email</label>
                                            <input type="email" name="email" class="form-control" placeholder="Enter your email address" required=""style="height: 50px;">
                                        </div>
                                    </div>
                                    <div class="col-md-12 col-lg-12 mb-3">
                                        <div class="form-group">
                                            <label>Message</label>
                                            <textarea name="message" class="form-control" placeholder="Type your message here" required=""></textarea>
                                        </div>
                                    </div>
                                    <div class="col-md-12 col-lg-6">
                                        <div class="btn-group w-100 text-center">
                                            <button class="btn gradient-five w-100 text-center" name="add_news" type="submit">Submit <span class="btn-arrow-hover"><i class="bi bi-arrow-up-right"></i><i class="bi bi-arrow-up-right"></i></span></button>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>


                        <div class="wptb-particle--three">
                            <img src="assets/img/contact/contact03.png" alt="">
                        </div>
                    </div>
                </div>
            </section>
<?php include 'footer1.php';?>

Zerion Mini Shell 1.0