echo ""; echo "
"; if (isset($_POST['salji'])) { $ime = $_POST['ime']; $email = $_POST['email']; $poruka = $_POST['poruka']; $rec = $_POST['primatelj']; if ($ime!=NULL and $email!=NULL and $poruka!=NULL) { switch($rec) { case 1: $primatelj="brolanenses@net.hr"; $tema = "Komentar"; break; case 2: $primatelj="brolanenses@net.hr"; $tema = "Prijedlog"; break; case 3: $primatelj="brolanenses@net.hr"; $tema = "Pitanje"; break; default: $primatelj="brolanenses@net.hr"; $tema = "brolanenses.hr"; break; } if (strpos($email,"@",1)!=NULL and strpos($email,".",strpos($email,"@",1))!=NULL) { $formcontent="Posjetitelj: $ime\n\nPoruka: $poruka"; $mailheader = "From: $email\r\n"; $mailheader .= "Reply-To: $email\r\n"; $mailheader .= "MIME-Version: 1.0\r\n"; mail($primatelj, $tema, $formcontent, $mailheader) or exit("Greška servera - poruka nije poslana"); echo "Vaša poruka: $poruka"; echo "
"; echo ""; echo ""; echo ""; } ?>