help with e-mail form

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • bluerovers
    Sergeant Major

    • Aug 2007
    • 98

    help with e-mail form

    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

    bluerovers

    bluerovers
    www.bluerovers.co.nz
    www.five-a-side.co.nz
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #2
    Re: help with e-mail form

    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:

    <?PHP
    $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);
    ?>
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment

    • bluerovers
      Sergeant Major

      • Aug 2007
      • 98

      #3
      Re: help with e-mail form

      hi

      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

      bluerovers
      www.bluerovers.co.nz
      www.five-a-side.co.nz

      Comment

      • bluerovers
        Sergeant Major

        • Aug 2007
        • 98

        #4
        Re: help with e-mail form

        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
        bluerovers
        www.bluerovers.co.nz
        www.five-a-side.co.nz

        Comment

        • bluerovers
          Sergeant Major

          • Aug 2007
          • 98

          #5
          Re: help with e-mail form

          hi naval. have downloaded ABVFP and it has save me loads of work!!!
          thank-you for your briliant addition to blue Voda

          thanks
          bluerovers
          www.bluerovers.co.nz
          www.five-a-side.co.nz

          Comment

          Working...
          X