You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
753 B
33 lines
753 B
<html>
|
|
<body>
|
|
|
|
<?php
|
|
if (isset($_REQUEST['email']))
|
|
//if "email" is filled out, send email
|
|
{
|
|
//send email
|
|
$email = $_REQUEST['email'] ;
|
|
$adressat = $_REQUEST['adressat'] ;
|
|
$subject = $_REQUEST['subject'] ;
|
|
$message = $_REQUEST['message'] ;
|
|
mail($adressat, $subject,
|
|
$message, "From:" . $email);
|
|
echo "Thank you for using our mail form";
|
|
}
|
|
else
|
|
//if "email" is not filled out, display the form
|
|
{
|
|
echo "<form method='post' action='formmailer.php'>
|
|
From: <input name='email' type='text'><br>
|
|
To: <input name='adressat' type='text'><br>
|
|
Subject: <input name='subject' type='text'><br>
|
|
Message:<br>
|
|
<textarea name='message' rows='15' cols='40'>
|
|
</textarea><br>
|
|
<input type='submit'>
|
|
</form>";
|
|
}
|
|
?>
|
|
|
|
</body>
|
|
</html>
|
|
|