Results 1 to 3 of 3

Thread: Question about the php coding for ACTION.php
      
   

  1. #1
    ClevelandSlim is offline Private
    Join Date
    Apr 2008
    Posts
    1

    Default Question about the php coding for ACTION.php

    I have scoured the forum looking for the help I needed, and I now have a form working on my page.

    My question now is...

    -----

    <?PHP
    $mailto = "playerzmediafilms******.com";
    $email = $HTTP_POST_VARS['email'];
    if ($email == "") {
    $email = $mailto;
    }
    $mailsubj = "testing tiffany's mail form";
    $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);
    ?>

    -----

    This coding is sending the form data to MY EMAIL, but it is also placing MY EMAIL as the FROM section of the email as well.

    How do I get the form submission to come to inbox with the person who submitted the form's email address in the FROM box (so I can reply by simply hitting reply?

    Thank you for any help.
    ~Slim~

  2. #2
    Andy128's Avatar
    Andy128 is offline Major General
    Join Date
    Dec 2005
    Location
    Michigan
    Posts
    2,322

    Default Re: Question about the php coding for ACTION.php

    Make the email field a mandatory field. That way they cannot send the form unless they input an email address.

    Do do this, simply click on the email filed and then click on the Validate tab. Click on the box that has "No constraints" and choose Email Address.
    Then put a check in the Csutom Error Message box. In the box below that- write your message like: Please put a valid Email address in the Email field. Thank you.

    Then below that, put a check in the data required and set your minimum and max character limites (5 and 45 should do).

    Click ok. Save and Publish.

    Andy
    PHP- is a blast!

  3. #3
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Question about the php coding for ACTION.php

    The script uses your own email address as "From" email address, if the "email" field in the form is empty. It does this because if no "From" email address is included, most ISPs will block the mail.

    The problem can arise if the visitor's email address field is named something different than "email" (in example, UPPER CASE "E") or no email address is filled in. In these cases the script PURPOSELY uses your own email address as "From".
    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!


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

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 36 37 38 39 40 41 42 43 44 45 46 47 48 49