Your message has been successfully sent to us
and we will reply as soon as possible.

A copy of your query has been sent to you.

Thank you for contacting us.

'; $replymessage = "Hi $name Hvala na poruci. We will endeavour to reply to you shortly. Please DO NOT reply to this email. Below is a copy of the message you submitted: -------------------------------------------------- Subject: $thesubject Query: $themessage -------------------------------------------------- Thank you"; // email variable not set - load $valid_ref1 page if (!isset($_POST['email'])) { echo ""; exit; } $ref_page=$_SERVER["HTTP_REFERER"]; $valid_referrer=0; if($ref_page==$valid_ref1) $valid_referrer=1; elseif($ref_page==$valid_ref2) $valid_referrer=1; if(!$valid_referrer) { echo ""; exit; } $themessage = "name: $name \nQuery: $themessage"; mail("$replyemail", "$thesubject", "$themessage", "From: $email\nReply-To: $email"); mail("$email", "Receipt: $thesubject", "$replymessage", "From: $replyemail\nReply-To: $replyemail"); echo $success_sent_msg; ?>