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.
48 lines
1.1 KiB
48 lines
1.1 KiB
14 years ago
|
<?php
|
||
|
|
||
|
require_once("_head.php");
|
||
|
|
||
14 years ago
|
mkheader("mailing!", "#eee");
|
||
14 years ago
|
|
||
|
?>
|
||
|
|
||
|
<body>
|
||
|
|
||
|
<!-- ======================================================= -->
|
||
|
<?php
|
||
|
|
||
|
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||
|
mail(
|
||
14 years ago
|
$_POST['toaddr'],
|
||
|
$_POST['subject'],
|
||
|
$_POST['message'],
|
||
14 years ago
|
"From: {$_SERVER['PHP_SELF']} <php@localhost>"
|
||
|
);
|
||
|
?><p>Sent!</p><p><a href="<?php echo $_SERVER['PHP_SELF']; ?>">clear this</a></p><?php
|
||
|
|
||
|
} else {
|
||
|
?>
|
||
|
|
||
14 years ago
|
<p>Send an email to somebody!</p>
|
||
14 years ago
|
|
||
14 years ago
|
<form name="send_email" action="" method="POST">
|
||
|
<label class="block" for="toaddr">To:</label>
|
||
|
<input type="text" id="toaddr" name="toaddr" />
|
||
14 years ago
|
|
||
14 years ago
|
<label class="block" for="subject">Subject:</label>
|
||
|
<input type="text" id="subject" name="subject" />
|
||
|
|
||
|
<label class="block" for="message">Message:</label>
|
||
|
<textarea name="message" id="message" rows="10" cols="80"></textarea>
|
||
14 years ago
|
|
||
14 years ago
|
<input class="block" type="submit" name="submit" value="Send" />
|
||
14 years ago
|
</form>
|
||
|
|
||
|
<?php
|
||
|
}
|
||
|
|
||
|
?>
|
||
|
|
||
|
</body>
|
||
|
</html>
|