View Full Version : help with e-mail form

10-16-2007, 01:50 AM
hi all

i have designed a basic e-mail form with bluevoda and i would like to know is there a way to have the subject of the e-mail sent be contents of part of the form??

thanks in advance


10-16-2007, 05:32 AM
I am not sure what you mean. If you want the user to be able to type the email subject, as in a normal email, create a field in your form, named "subject". Then, change the php script to be:

$mailto = "exampleemail@example.com";
$email = $_POST['email'];
if ($email == "") {
$email = $mailto;
$mailsubj = $_POST['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))
if ($key!="submit")
$mailbody .= "$key : $val\n";
mail($mailto, $mailsubj, $mailbody, $mailhead);

10-16-2007, 10:04 PM

the form i designed is so that our teams can post their results on the club website and instead of the e-mail subject being the same every time i would like to have it so the subject is the fiel 'your team'.

i have changed the line of code to $mailsubj = $_POST['yourteam'];

thank-you muchly

10-16-2007, 10:20 PM
hi naval

have just done a test run and it work perfectly!!! just going to master the abvfp and i'll be on my way

thanks again

10-18-2007, 09:17 AM
hi naval. have downloaded ABVFP and it has save me loads of work!!!
thank-you for your briliant addition to blue Voda