vBulletin

Thank you for visiting. This is our website archive. Please visit our main website by clicking the banner above.
vBulletin FAQ is dedicated to helping the forum owner build, manage and profit from his vBulletin Forum
vBulletin Web Hosting - Free skins and styles for your vBulletin - Search Engine Optimization




Form to Email

Dr. Sarf
11-12-2007, 04:08 PM
Hi all, hope you can help, I really don't know a thing about PHP but I do have a working feedback form that simply submits to the following PHP script:

<p align="center">&nbsp;</p><script language="php">
$email = $HTTP_POST_VARS[email];
$mailto = "myemail@mydomain.com";
$mailsubj = "Any Subject";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; }
if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); }
</script>

This works fine but I want to somehow integrate a function that allows users to put their email address in a field on the form (easy) and for the form contents to then be emailed to that address, as well as the one defined in the $mailto part of the script.
I've no idea how to modify the script so it calls from the field containing the email address the user puts in, and then emails the contents to them?

I'd really appreciate any help on this.
Thanks
Mat


vBulletin

seo book

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum