File "contactDone.php"

Full Path: /home/chawlag2/public_html/bikes/assets/img/team/contactDone.php
File size: 2.96 KB
MIME-type: text/x-php
Charset: utf-8

<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    // Sanitize form inputs
    $name = htmlspecialchars($_POST['name']);
    $email = htmlspecialchars($_POST['email']);
    $subject1 = htmlspecialchars($_POST['subject']);
    $message = htmlspecialchars($_POST['message']);

    // Recipient email address
    $to = "syedzeeshanali38@gmail.com";

    // Subject of the email
    $subject = "Request Received For Two Wheelers!";

    // Email content
    $msg = "<html>
    <head>
      <title></title>
    </head>
    <body>
      <table border='0' width='100%' align='center'>
        <tr>
          <td colspan='2'>
            <p align='center'>
              <img src='chawlagreenmotors.com/images/logo2.png' width='140px;'>
          </td>
        </tr>
      </table>

      <table border='0' width='100%' align='center'>
        <tr>
          <td colspan='2' align='left'><font color='black' size='+1'>Dear Sir,<br>An information request has been submitted with details as below:
          </td>
        </tr>
      </table>

      <table border='1' width='60%' align='left'>
        <tr>
          <td align='left'><font color='black' size='+1'>Name</td>
          <td align='left'><font color='black' size='+1'>".$name."</td>
        </tr>
        <tr>
          <td align='left'><font color='black' size='+1'>Request For</td>
          <td align='left'><font color='black' size='+1'>TWO WHEELER VEICLES</td>
        </tr>
        <tr>
          <td align='left'><font color='black' size='+1'>Subject </td>
          <td align='left'><font color='black' size='+1'>".$subject1."</td>
        </tr>

        <tr>
          <td align='left'><font color='black' size='+1'>Message </td>
          <td align='left'><font color='black' size='+1'>".$message."</td>
        </tr>

      </table>

      <table border='0' width='100%' align='center'>
        <tr>
          <td colspan='2' align='right'><font color='black' size='+2'></td>
        </tr>
      </table>
      <table border='0' width='100%' align='left'>
        <tr>
          <td>
            <br><br><br>
            <p><font color='black' size='+1'>Ragards,<br>Chawla Green Motors</p>
            <br><img src='chawlagreenmotors.com/images/logo2.png' width='100px'>
            <br>
          </td>
        </tr>
      </table>
    </body>
  </html>";


  $headers = "MIME-Version: 1.0" . "\r\n";
  $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
  $headers .= "From: Chawla<no-reply@civiccodes.com>";
  //$myMail = mail($email,$subject,$msg,$headers);


  $email = "syedzeeshanali38@gmail.com";
  //$myMail = mail($email,$subject,$msg,$headers);

  $email = "info@chawlagreenmotors.com";
   $myMail = mail($email,$subject,$msg,$headers);
  //die();
  echo "<script language = 'javascript'> alert ('Thank you! Our team wll get back to you shortly.')</script>";
  echo "<script language='javascript'> window.location.href='index.html'</script>";
}
?>