<?php

if ($_SERVER['REQUEST_METHOD'] == 'POST') {

    $name    = htmlspecialchars($_POST['name']);
    $email   = htmlspecialchars($_POST['email']);
    $phone   = htmlspecialchars($_POST['phone']);
    $message = htmlspecialchars($_POST['message']);

    $to = EMAIL_1;

    $subject = "New Enquiry Received";

    $body = "

Name : $name

Email : $email

Phone : $phone

Message :

$message

";

    $headers = "From: noreply@innovixplast.com";

    mail(
        $to,
        $subject,
        $body,
        $headers
    );

    header(
        'Location: contact.php?success=1'
    );

    exit;

}

?>