Merge remote-tracking (subtree) branch 'PracticingPhp/master'

This commit is contained in:
Dan Buch
2012-03-03 20:18:34 -05:00
905 changed files with 218528 additions and 0 deletions

View File

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