MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 3.142.194.183
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home1/a1673wkz/propstonerealty.com/Admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home1/a1673wkz/propstonerealty.com/Admin/add_contact.php
<?php
include("config.php");
//print_r($_POST);
if(!empty($_POST['name']) && !empty($_POST['phone']) && !empty($_POST['email']) && !empty($_POST['message']))
{
    $name=$_POST['name'];
    $phone=$_POST['phone'];
    $email=$_POST['email'];
    $message=$_POST['message'];
    $date=date('Y-m-d');

    $insert=$obj->query("INSERT INTO `callreq` (`uname`, `ph`, `email`, `msg`, `date`) VALUES ('$name', '$phone', '$email', '$message', '$date')");
    if($insert)
    {
        $headers = "MIME-Version: 1.0" . "\r\n";
                $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
                // More headers
                $headers .= 'From:'.$email."\r\n";
               
               

               
                $headers .= "X-Priority: 3\r\n";
                $headers .= "X-Mailer: PHP" . phpversion() . "\r\n";

                //echo $headers;
                $email_from = $email;

                //replace with your email

                $email_to = 'koushik@adretsoftware.com';
                $subject = "$name Successfully Registered";
                $body = '<b>Name: </b> ' . $name . '<br>' . '<b>Email:</b> ' . $email . '<br>'  . '<br>' . 
                '<b>Phone:</b> ' . $phone. '<br><b>Messege:</b>'.$messege;
                // echo $body;
                // die();
                $success = mail($email_to, $subject, $body, $headers);
                if($success)
                {
                 echo '<p class="alert alert-success mt-3">WE WILL GET IN TOUCH WITH YOU SHORTLY.</p>';
                }
                else
                {
                    echo '<p class="alert alert-danger mt-3">Faild Something Wrong</p>';
                }
    }
    else
    {
        echo '<p class="alert alert-danger mt-3">Faild Something Wrong</p>';
    }
}
else
{
    echo '<p class="alert alert-warning mt-8">Empty Field</p>';
}
?>

MMCT - 2023