<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>

<?php 
session_start();

?>
<?php
$to = "pyro_chue@hotmail.com";
$subject = $_REQUEST['form_topic'];
$firstname = $_REQUEST['form_firstname'] ;
$phonenumber = $_REQUEST['form_phonenumber'] ;
$url = $_REQUEST['form_url'] ;
$email = $_REQUEST['form_email'] ;
$message = $_REQUEST['form_message'] ;
$headers = "From:$email";
$website = "$url";
$content = "First Name: $firstname\nLast Name: $lastname\nPhone Number: $phonenumber\nMessage: $message";


if( $_SESSION['security_code'] == $_POST['security_code'] && !empty($_SESSION['security_code'] ) ) {

$sent = mail($to, $subject, $content, $headers) ;

}
if($sent){
echo("<p>Message successfully sent!</p>");}
else{
echo("<p>Message delivery failed... You have provided an invalid security code</p>");}
?>


</head>

<body>

</body>
</html>
