<?  

$adminaddress = "enquiry@reignconsulting.my"; 
$siteaddress ="http://www.reignconsulting.my"; 
$sitename = "Reign Consulting"; 

//No need to change anything below ... 
// Gets the date and time from your server
$date = date("m/d/Y H:i:s");

// Gets the IP Address
if ($REMOTE_ADDR == "") $ip = "no ip";
else $ip = getHostByAddr($REMOTE_ADDR);

// Gets the POST Headers - the Flash variables
$action = $HTTP_POST_VARS['action'] ;
$name = $HTTP_POST_VARS['name'] ;
$email = $HTTP_POST_VARS['email'] ;
$title = $HTTP_POST_VARS['title'] ;
$phone = $HTTP_POST_VARS['phone'] ;
$comment = $HTTP_POST_VARS['comment'] ;


//Process the form data!
// and send the information collected in the Flash form to Your nominated email address

if ($action == "send") {
	//
	mail ("$adminaddress","Reign Consulting visitor's comment",
	"A visitor at $sitename has left the following query\n
	Name : $name
	Email: $email
	Phone: $phone
	
	The visitor's Comments:
	------------------------------
	Title: $title
	
	Comments: $comment
	------------------------------
	Date/Time:  $date","FROM:$adminaddress" ) ; 
	
	
	
	//Confirmation is sent back to the Flash form that the process is complete
	$sendresult = "Thank You. Your message sent.";
	$send_answer = "answer=";
	$send_answer .= rawurlencode($sendresult);
	echo $send_answer;
	
	//This sends a confirmation to your visitor
	mail ("$email","Thank You for visiting $sitename", 
	"Hi $name,\n
	Thank you for your interest in $sitename!\n
	Cheers,
	$sitename
	$siteaddress","FROM:$adminaddress") ;
} //


?>

