Tema paskelbta: 2010-01-07 14:51:34
pasidariau kontaktų formą, tik man į emailą atsiunčia tuščią laišką, o turėtų atsiūsti visa tai, kas reikalinga kontaktų formoi.ką reik daryt?
echo $_POST['vardas'];
<?
$subject="from ".$_GET['Name'];
$headers= "From: ".$_GET['Password']."\n";
$headers.='Content-type: text/html; charset=iso-8859-1';
mail("", $subject, "
<html>
<head>
<title>Contact letter</title>
</head>
<body>
<br>
".$_GET['message']."
</body>
</html>" , $headers);
echo ("Your message was successfully sent!");
?>
<script>
resizeTo(300, 300)
//window.close()
</script><form action="contact.php" method="get"> Name: <input type="text" size="10" maxlength="40" name="name"> <br /> Password: <input type="password" size="10" maxlength="10" name="password"><br / <input type="reset"> <input type="submit"> </form>
<form action="contact.php" method="post"> Name: <input type="text" size="10" maxlength="40" name="name"> <br /> Password: <input type="password" size="10" maxlength="10" name="password"><br / > <input type="reset"> <input type="submit" name="submit"> </form>
<?php
// Jeigu buvo paspaustas išsiuntimo mygtukas.
if(isset($_POST['submit']))
{
$headers = '';
$name = $_POST['name'];
$password = $_POST['password'];
$message = $_POST['message']; // pas tave formoje nėra laukelio pavadinimu message.
$headers .= 'Content-type: text/html; charset=iso-8859-1';
$subject = "Laiskas gautas nuo: ". $name;
$body = "<html>
<head>
<title>Contact letter</title>
</head>
<body>
<br>
". $message ."
</body>
</html>";
mail("", $subject, $body, $headers);
}
?>