MMCT TEAM
Server IP : 162.214.80.37  /  Your IP : 216.73.216.83
Web Server : Apache
System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : imyrqtmy ( 2189)
PHP Version : 8.2.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home2/imyrqtmy/public_html/saavytechnologies/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/imyrqtmy/public_html/saavytechnologies/mail.php
<?php
include("Admin/Includes/db.php");

extract($_POST);


// echo $name = $_POST['name'];
// echo $phone = $_POST['phone'];
// echo $email = $_POST['email'];
// echo $subject = $_POST['sub'];


// ini_set( 'display_errors', 1 );
// error_reporting( E_ALL );
// $from = "ravibahuguna630@gmail.com";
//   $to = $_POST['email'];
//   $subject =$_POST['sub'];
//   $message = $_POST['name'].'<br>'.$_POST['sub'];
// $headers = "From:" . $from;
// if(mail($to,$subject,$message, $headers)) {
//     // header("location: ../index.php");
//      echo "The email message was   sent.";
// } else {
//     echo "The email message was not sent.";
// }




                                  $email=$_POST['email'];
                                  $html_message  =  '<h1>New Enquriy Details.</h1>';
                                  $html_message  .=   '<p>First Name : '. $_POST['firstname'] .'</p>';
                                  $html_message  .=   '<p>Last Name : '. $_POST['lastname'] .'</p>';
                                  $html_message  .=   '<p>Email :'.$_POST['email'].'</p>';
                                  $html_message  .=   '<p>Phone Number : '. $_POST['phone'] .'</p>';
                                  $html_message  .=   '<p>Service : '. $_POST['service'] .'</p>';
                                  $html_message  .=   '<p>Subject : '. $_POST['subject'] .'</p>';
                                  $html_message  .=   '<p>message : '. $_POST['message'] .'</p>';
                                 
                                  
                                  
          
                $to ="schooldspublic@gmail.com" ;
                //  $subject = "Admission Enquiry";
                 $header = "From:$email \r\n";
                 $header .= "MIME-Version: 1.0\r\n";
                 $header .= "Content-type: text/html\r\n";
                 
                //  $retval = mail ($to,$subject,$html_message,$header);
                 
                

                  $SQL = "INSERT INTO tbl_contact set name='$firstname',lname='$lastname',email='$email',phno='$phone',service='$service',subject='$subject',comment='$message' ";

                  $result = mysqli_query($con,$SQL);

                   if( $result >0) {
                         echo "<script>;
                            alert('Enquiry Send Succesfully');
								window.location.href='index.php';
								</script>";
                 }else {
                         echo "<script>;
                            alert('Mail Not Send Properly ');
                            window.location.href='index.php';
                            </script>";
                 }



?>

MMCT - 2023