<?  

$adminaddress = "sampalani03@yahoo.com"; 
$siteaddress ="http://www.shawarmaking.net"; 
$sitename = "Shawarma King"; 

//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'] ;
$query = $HTTP_POST_VARS['query'] ;


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

if ($action == "send") {
	//
	mail ("$adminaddress","Seri Setia Group visitor's comment",
	"A visitor at $sitename has left the following query\n
	Name : $name
	Email: $email
	
	The visitor's Comments:
	------------------------------
	Comments: $query
	------------------------------
	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") ;
} //


?>

