MassiveAttack sam poslušao i forma radi i sve je ok ali jeste da je trivijalan problem za znalce ali meni je opšte ludilo,naime kada se pouni forma i kada se pošalje otvori se strana sa Thank you ime.
I will get back to you as soon as posiable.
e sad šta treba dodati i gde da bi se vratilo na početak stranice
send.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Zanat</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
$to ="slavisa@zanat.rs";
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$msg = $_POST['msg'];
$sub = "form to mail";
$headers = "From: $name <$email>\n";
$headers .= "Content-Type: text/plain; charset=iso-8859-1\n";
$mes = "Subject: ".$subject."\n";
$mes .= "Message: ".$msg."\n";
$mes .= "Name: ".$name."\n";
$mes .= "Email: ".$email."\n";
$mes .= "Date & Time: ".$d."";
if(empty($name) || empty($email) || empty($subject) || empty($msg)) {
echo "<h3>Sorry all fields are required.</h3>";
} elseif(!ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) {
echo "<h3>Sorry the email address you entered is invalid.</h3>";
} else {
mail($to, $sub, $mes, $headers);
echo "<h3><center>Thank you $name.<br>I will get back to you as soon as posiable</center></h3>";
}
?>
</body>
</html>
|