Results 1 to 4 of 4

Thread: Send email confirmation message.
      
   

  1. #1
    azuredesign's Avatar
    azuredesign is offline Sergeant
    Join Date
    Aug 2007
    Posts
    25

    Default 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');


    ?>

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

    Default 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!


  3. #3
    azuredesign's Avatar
    azuredesign is offline Sergeant
    Join Date
    Aug 2007
    Posts
    25

    Default 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?

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

    Default 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!


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