<?
include_once("mainfile.php");
include("header.php");
$index = "1";
?>
<?
/* YOU MUST EDIT THIS LINE */
$youremail = "[email protected]";
?>
<html><head><title>Kontakt</title></head><body>
<?
if(($name) || ($email)) {
if($name) { } else {
print "Niste uneli ime i prezime!<br>\n";
}
if($email) { } else {
print "Niste uneli vaš e-mail!<br>\n";
}
if($poruka) { } else {
print "Niste napisali poruku!<br>\n";
print "<br>";
if(($name) && ($email) && ($poruka)) {
print "Uspešno ste me kontaktirali!<br><br>\n";
$to = $youremail;
$from = $email;
$subject = "Kontakt";
mail ($to, $subject, "Ime: $name Mail: $email Poruka: $poruka ", "From: [email protected]" ) or print "Nastala je nepoznata greska.<br>";
}
}
?>
<img src="Kontakt.gif"></img>
<form method=POST action="<? echo $PHP_SELF; ?>">
<table>
<tr><td width="113">Ime i Prezime:</td> <td width="205"><input type="text" name="name" value="<? echo $name; ?>" size=34></td></tr>
<tr><td>Vaš e-mail:</td><td><input type="text" name="email" value="<? echo $email; ?>" size=34></td></tr>
<tr><td>Vaša poruka:</td><td><textarea name="poruka" cols="30" id="poruka"><? echo $poruka; ?></textarea></td></tr>
<tr><td><input name="Submit" type="Submit" value="Posalji"></td></tr>
</table>
</body></html>
<?
include("footer.php");
?>