<?php
             
                           if(isset($_POST['name'])
                              && !empty($_POST['name'])
                              && isset($_POST['email'])
                              && !empty($_POST['email'])
                              && isset($_POST['number'])
                              && !empty($_POST['number'])
                              && isset($_POST['subject'])
                              && !empty($_POST['subject'])
                              && isset($_POST['message'])
                              && !empty($_POST['message'])){


        
require_once('PHPMailer-master/class.phpmailer.php');

        $mail = new PHPMailer;
        $mail->IsHTML(true);
        $mail->setFrom($_POST['email'], $_POST['name']);
        $mail->addAddress('sales@jvginteriors.com'); //Email address to send submitted form to
        $mail->Subject = $_post['subject'];
        $mail->Body = $_POST['message'].'<br><br>Name: '.$_POST['name'].'<br><br>Number: '.$_POST['number'];
        // Attach the uploaded file
      
        if (!$mail->send()) {
            $msg .= "Mailer Error: " . $mail->ErrorInfo;
        } else {
            $msg .= "Message sent!";
        }


?>Message Sent<?php
          }else{
            ?>
            Get In Touch
              <?php
            }
            ?>