1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to add email function in PHP in Order form

Discussion in 'PHP' started by Sheraz Khan Baloch, Oct 26, 2013.

  1. #1
    I have created an order form on the link below
    When a person fills up the form, and goes o the payment, I want that all info which he entered, must be emailed to us. But I dont know how to do this. The PHP files of all the 4 forms are attached.
    I want to add email function in that way that on Preview page, when a user submit the information and directed to payment processor, its info should be sent to our desired email ID. Can anyone help?

    Attached Files:

    Solved! View solution.
    Last edited: Jan 28, 2014
    Sheraz Khan Baloch, Oct 26, 2013 IP
  2. #2
    Check out this code from w3shools so you can see how simple it is actually.

    $to = "someone@example.com";
    $subject = "Test mail";
    $message = "Hello! This is a simple email message.";
    $from = "someonelse@example.com";
    $headers = "From:" . $from;
    echo "Mail Sent.";
    jscg, Oct 27, 2013 IP
  3. seotraining

    seotraining Active Member

    Likes Received:
    Best Answers:
    Trophy Points:
    If you are using php then you can uise simple mail function if you want to send text mail but you should check with your server hwo many mails you can send. For sending mail wiht an attachment either you have to use library or you should have a class to send with an attachment if you dont know how to make customized one in php
    seotraining, Oct 27, 2013 IP
    Crock likes this.
  4. ezprint2008

    ezprint2008 Active Member

    Likes Received:
    Best Answers:
    Trophy Points:
    Digital Goods:
    You'll be sending details in your email about the user so you need to set up your $message part of that email
    $message = $firstname . " " . $lastname . "\r\n" .
    "Address line1 " . " " . $address _line1 . "\r\n" .
    (etc.. all the addy info then the product info)
    "Product: " . " " . $product . "\r\n" ;

    then when $message is called, all of that information will be in the body /message of the email.
    dont send credit cards that way...unless you are encrypting. GNuPg (or a server side secure system)
    ezprint2008, Oct 30, 2013 IP