a grand renaming so that the most significant portion of the name comes first
This commit is contained in:
47
php-practice/web/html/wikipedia-tutorial/mailing.php
Normal file
47
php-practice/web/html/wikipedia-tutorial/mailing.php
Normal 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>
|
Reference in New Issue
Block a user