Ем пробвах със php, направих следното нещо:
index.html ми започва ето така:
Код:
<body>
<form name="form" method="post" action="contact.php">
а contact.php
Код:
<html>
<head><title>PHP Mail Sender</title></head>
<body>
<?php
/* All form fields are automatically passed to the PHP script through the array $HTTP_POST_VARS. */
$email = $HTTP_POST_VARS['bboygame@abv.bg'];
$subject = $HTTP_POST_VARS['send'];
$message = $HTTP_POST_VARS['thanks'];
/*Validation of subject and also mail */
if (!preg_match(”/w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*/”, $email)) {
echo “<h4>Invalid email address</h4>”;
echo “<a href=’javascript:history.back(1);’>Back</a>”;
} elseif ($subject == “”) {
echo “<h4>No subject</h4>”;
echo “<a href=’javascript:history.back(1);’>Back</a>”;
}
/* Sends the mail and outputs the “Thank you” string if the mail is successfully sent, or the error string
otherwise. */
elseif (mail($email,$subject,$message)) {
echo “<h4>Thank you for sending email</h4>”;
} else {
echo “<h4>Can’t send email to $email</h4>”;
}
header("location: thanks.php");
?>
</body>
</html>
</body>
</html>
и накрая в thanks.php ... съм написал някакво съобщение там ... незнам къде ми е грешката... да не би нещо да не съм го качил както трябва ли ... незнам, моля ви помогнете.