<?php

if(!isset($_POST['submit'])){
    echo "error; you need to submit the form";
};


$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$subject = $_POST['subject'];
$message = $_POST['cment'];


if(empty($name) || empty($email) || empty($message))
{
   echo"name, email and message are mandatory!";
   exit;
};


$email_from = 'info@riologisticsghana.com';
$email_subject = "New Contact Form Submission";
$email_body = "You have recieved a message from ".$name."\n\n";
"email address: ".$email.'\n\n';
"Message:\n".$message;

$to = "info@riologisticsghana.com";
$headers = "from: ".$email_from;



mail($to,$email_subject,$email_body,$headers);
 

?>