$text"; $action = $_REQUEST['action'] ; if ($action=='send') //if contact form is filled in { $name = $_REQUEST['name'] ; $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; $tphone = $_REQUEST['tphone'] ; $tproperty = $_REQUEST['tproperty'] ; $tsubject = $_REQUEST['tsubject'] ; $to = $contact; $subject = "$site_name Website Enquiry"; mail( $to, $subject, "This is an automated email generated because someone filled out the CONTACT form on the website. Name: $name Phone: $tphone Property: $tproperty Subject: $tsubject Message: $message ", "from: $email"); echo "Thank you, we will contact you back shortly"; } else { echo " Contact Us:

Your Name:  
Your Email:    
Your Phone:    
Property:    
Subject:    
Your Message:
"; } } else { echo "$text"; } ?>