Example of mail()
| From: | Renzo Clavijo | Date: | Fri, 28 Apr 2006 13:03:49 +0000 |
| Subject: | Example of mail() | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-41768@lists.php.net to get a copy of this message | ||
Hi all.
In the code bellow you'll find an easy to use example of mail().
I know it's very simple but the question is: How can I erase the
values held in $_REQUEST such that when I press F5 or I click "Reload"
there are no messages sent again?
Thanks a lot for your help.
Best Regards
RENZO CLAVIJO
PD: Please forgive me if my english is not OK
--------------
<html>
<head>
<title>Correo</title>
</head>
<body>
<form name="form_send" method="post" target="<?php echo
$_REQUEST['PHP_SELF'];?>">
Address: <input type="text" name="address_mail" size="20">
<br>
Subject: <input type="text" name="subject" size="20">
<br>
Message: <input type="text" name="message" size="20">
<br>
<input type="submit" name="send_mail" value="Enviar">
</form>
</body>
<?php
if(isset($_REQUEST['send_mail'])){
mail($_REQUEST['address_mail'],$_REQUEST['subject'],$_REQUEST['message']);
}
?>
</html>
---------------------------------
Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice.