', $porukaa);
//START OF THANKS MESSAGE
//you may edit $thanks message. this is a message which displays when user sends mail from your site
$thanks = "
Your message has sucessfuly been sent!
#### MESSAGE TEXT ####
$poruka
#### END OF MESSAGE ####
You will receive a copy of the message at your email address ($mail). We will reply you soon as possible
";
//do not edit nothing below this line until comment (ME) say so if you don't have skills with PHP
//END OF THANKS MESSAGE
if($_POST['submitform'])
{
$Name = $_POST['Name'];
$Email = $_POST['Email'];
$Message = $_POST['Message'];
$require = $_POST['require'];
$browser = $HTTP_USER_AGENT;
$ip = $_SERVER['REMOTE_ADDR'];
$dcheck = explode(",",$require);
while(list($check) = each($dcheck))
{
if(!$$dcheck[$check]) {
$error .= "You have not filled this filed(s): $dcheck[$check]. ";
}
}
if ((!ereg(".+\@.+\..+", $Email)) || (!ereg("^[a-zA-Z0-9_@.-]+$", $Email))){
$error .= "Wrong e-mail. This e-mail address $Email - is not valid. Please enter correct e-mail address.";
}
if($error)
{
echo $error;
echo ' Please try again.';
}
else
{
//START OF INCOMING MESSAGE (this message goes to your inbox)
$message = "
Name: $Name:
E-mail: $Email
Message: $Message
-----------------------------
Browser: $browser
IP: $ip
";
//END OF INCOMING MESSAGE (this message goes to your inbox)
$subject = "Message from your site.com - Message was sent by $Name"; //subject OF YOUR INBOX MESSAGE sent to you
$subject2 = "You have succesfully sent message from yoursite.com!"; //subject of OUTGOING MESSAGE - edit this
//OUTGOING MESSAGE TEXT
$message2 = "You have sent a message to site admin of a yourdomain.com:
-----------------------------
From: $Name:
E-mail: $Email
Message: $Message
-----------------------------
";
//END OF outgoing MESSAGE