Send email confirmation message.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • azuredesign
    Sergeant

    • Aug 2007
    • 25

    Send email confirmation message.

    I am trying to get user's input on a form, send the form information to myself in an email, and then send the user and email to their inputted email address. This is the code I have, not sure what I'm doing wrong??!?!?


    PHP Code:
    <?php

    $message 
    "Here is a Sign Change " "\n\n";
    $message $message "Submission Date and Time: " date("l dS of F Y h:i:s A") . "\n";
    $message $message "Customer Name: " $_REQUEST['CustName'] . "\n";
    $message $message "Contact Name: " $_REQUEST['ContactName'] . "\n";
    $message $message "Phone Number: " $_REQUEST['Phone'] . "\n" "\n";
    $message $message "Email Address: " $_REQUEST['EmailAddress'] . "\n" "\n";
    $message $message "Requested Change Date: " $_REQUEST['ChangeDate'] . "\n" "\n";
    $message $message "Additional Comments: " $_REQUEST['Comments'] . "\n" "\n";
    $message $message $_REQUEST['EmailSubmission'];

    // In case any of our lines are larger than 70 characters, we should use wordwrap()
    $message wordwrap($message70);

    // Send to impact signs and insert headers and subject
    $email "joewiebe******.com";
    $subject "Here is a sign change email!";
    $header "From: WebEmail\r\n"

    // Compile info and send to submitter
       
    mail($email,$subject,$message,$header);

    $message "Thank you for submitting a form";
       
    $email $_POST["EmailAddress"]
       
    $subject "Thank you for your submission";
       
    $header "From: impact_signs@mts.net\n"
      
       
    // Compile info and send to submitter
       
    mail($email,$subject,$message,$header);

       
    // redirect back to url visitor came from
       
    header('location:home.php');


    ?>
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #2
    Re: Send email confirmation message.

    Why don't you simply use ABVFP ? It will do excactly what you need.
    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

    • azuredesign
      Sergeant

      • Aug 2007
      • 25

      #3
      Re: Send email confirmation message.

      Well I would like to know the coding, and not just take the easy route...

      I've come thus far with PHP already, and this is the first problem I've encountered...

      Doesn't anybody here know about this stuff?

      Comment

      • navaldesign
        General & Forum Moderator

        • Oct 2005
        • 12080

        #4
        Re: Send email confirmation message.

        Ok. You have three syntax problems (missed ";") :

        <?php

        $message = "Here is a Sign Change " . "\n\n";
        $message = $message . "Submission Date and Time: " . date("l dS of F Y h:i:s A") . "\n";
        $message = $message . "Customer Name: " . $_REQUEST['CustName'] . "\n";
        $message = $message . "Contact Name: " . $_REQUEST['ContactName'] . "\n";
        $message = $message . "Phone Number: " . $_REQUEST['Phone'] . "\n" . "\n";
        $message = $message . "Email Address: " . $_REQUEST['EmailAddress'] . "\n" . "\n";
        $message = $message . "Requested Change Date: " . $_REQUEST['ChangeDate'] . "\n" . "\n";
        $message = $message . "Additional Comments: " . $_REQUEST['Comments'] . "\n" . "\n";
        $message = $message . $_REQUEST['EmailSubmission'];

        // In case any of our lines are larger than 70 characters, we should use wordwrap()
        $message = wordwrap($message, 70);

        // Send to impact signs and insert headers and subject
        $email = "joewiebe******.com";
        $subject = "Here is a sign change email!";
        $header = "From: WebEmail\r\n" ; // Missed a ; here. Also, you do NOT use the visitos email address as from" address, so you have a good 50 - 60% chances that the mail will be blocked by ISP

        // Compile info and send to submitter
        mail($email,$subject,$message,$header);

        $message = "Thank you for submitting a form";
        $email = $_POST["EmailAddress"] ; // Missed the ; here
        $subject = "Thank you for your submission";
        $header = "From: impact_signs@mts.net\n" ; // Missed the ; here


        // Compile info and send to submitter
        mail($email,$subject,$message,$header);

        // redirect back to url visitor came from
        header('location:home.php');


        ?>

        Since i don't know what this "Emailsubmission" field is, i don't know what is the use of it.
        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

        Working...
        X