[ raub @ 04.11.2008. 00:11 ] @
Pomoć ljudi,molim vas evo vam šaljem Code pa me zanima gde i kako upisati da se vrati posle uspešno poslatog mail-a na stranicu sajta koju želim <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>alexa</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php $to ="[email protected]"; $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> |