|
Posted by Chuck W. on 02/01/06 19:49
So I have a very simple mail script just to send a quick 'n dirty
notification of a form posting -- it goes like this:
$message = $_POST["salutation"] . "\", first_name = \"".
$_POST["first_name"] . "\",last_name = \"". $_POST["last_name"] .
"\",title = \"" . $_POST["title"] . "\", company = \"" .
$_POST["company"] . "\", leadsource = \"" . $_POST["lead_source"] ;
$headers .= 'From: Sender <sender@blahblah.com>' . "\r\n";
$subject = 'New record notification';
$to = 'recipient@blahblah.com';
// Mail it
mail($to, $subject, $message, $headers);
Crude, huh. Works though.
So I'm wondering how can I code this thing so when someone hits the
submit button on the form twice it doesn't send two email messages (or
more)? Wrap a session variable around it somehow?
Thanks,
Chuck
PHP Noob
Navigation:
[Reply to this message]
|