<?PHP

$name = $_POST['name'];
$email = $_POST['email'];
$number = $_POST['phone'];
$message = $_POST['message'];
$from = 'From: littlerockdome.co.za';
$to = 'website@littlerockdome.co.za';
$subject = 'Customer Inquiry';
$clientIP=$_SERVER['REMOTE_ADDR'];
$body = "From: $name\n E-Mail: $email\n Number: $number \n Message:\n $message \n Remote IP: $clientIP";


if (mail($to,$from,$body))
{
    echo "Message accepted";
    header("location: index.html#form5-m");
    echo "<div id='hidden'>alert alert-success col-12</div>";
}
else
{
    echo "Error: Message not accepted";
}
?>

<html>
    <body>
        
<a  href="index.html"> <br> RETURN TO HOME SCREEN</a>

        </body>
    </html>