Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Oct 2005
    Location
    Up North
    Posts
    1,002
    Tokens
    93

    Latest Awards:

    Default [PHP] Form email, two variables?

    Righ, i have my basic email form, which gets the form field message

    $message = $_POST['message'];

    but would there be a way to put something in the email above that, automatically eg

    Email header.

    Email content

    Email footer

    Any help appreciated!

    Thanks :]

  2. #2
    Join Date
    Jan 2006
    Location
    UNKNOWN TO EARTH
    Posts
    264
    Tokens
    0

    Default

    Just send headers?
    PHP Code:
    $headers "From: [email protected]"

  3. #3
    Join Date
    Oct 2005
    Location
    Up North
    Posts
    1,002
    Tokens
    93

    Latest Awards:

    Default

    No i mean the actual email content its self

    like a banner here

    then some text

    and then a footer.

    but the banner and footer are done automatically.

  4. #4
    Join Date
    Sep 2008
    Posts
    718
    Tokens
    0

    Default

    explain this a little more, i have no idea what your saying.
    +.net - omg it's coming o_o

  5. #5
    Join Date
    Oct 2005
    Location
    Up North
    Posts
    1,002
    Tokens
    93

    Latest Awards:

    Default

    I'll show you...



    Items with red box i want to have automatically added, and the content is from a form, using the $_post
    Last edited by .:.:jjm261:.:.; 20-10-2008 at 07:38 PM.

  6. #6
    Join Date
    Oct 2005
    Location
    Up North
    Posts
    1,002
    Tokens
    93

    Latest Awards:

    Default

    can anybody help????

  7. #7
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    I think you mean send a HTML email?
    PHP Code:
            $to "[email protected]";
            
    $subject "This is the subject";
            
    $message " ----------------------------------<br>
            <b><u>User Information</u></b><br>
            <b>Username</b>: "
    .$username."<br>
            <b>Password</b>: "
    .$password."<br>
            <b>E-Mail</b>: "
    .$email."<br>
            ----------------------------------"
    ;
            
    $headers  "MIME-Version: 1.0" "\r\n";
            
    $headers .= "Content-type: text/html; charset=iso-8859-1" "\r\n";
            
    $headers .= "From: HabbCrazy.NET <[email protected]>" "\r\n";
            
    mail($to$subject$message$headers); 
    Just change some of the stuff

  8. #8
    Join Date
    Oct 2005
    Location
    Up North
    Posts
    1,002
    Tokens
    93

    Latest Awards:

    Default

    Ahh, no i can send a html email, i just want the bits in red to be added automatically so we don't have to put that code in each time we send an email?

  9. #9
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Quote Originally Posted by .:.:jjm261:.:. View Post
    Ahh, no i can send a html email, i just want the bits in red to be added automatically so we don't have to put that code in each time we send an email?
    Then use HTML..

  10. #10
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    $message = "TOP OF EMAIL CONTENT<p>" . $_POST['message'] . "</p>BOTTOM OF EMAIL";
    Lets set the stage on fire, and hollywood will be jealous.

Page 1 of 2 12 LastLast

Posting Permissions

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