The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 5 of 5

Thread: customize mailer.php?

  1. #1

    customize mailer.php?

    I would like the results that mailer.php from here spits out to match my site. I put my HTML in the echo area where the results text is but it gives an error. How can I add my HTML to the results page so it looks like my site rather than a white page with a few words?

  2. #2
    PHP Code:

    <?php
    if(isset($_POST['submit'])) {

    $to "you@you.com";
    $subject "Form Tutorial";
    $name_field $_POST['name'];
    $email_field $_POST['email'];
    $message $_POST['message'];
     
    $body "From: $name_field\n E-Mail: $email_field\n Message:\n $message";
     
    echo 
    "<b>You put</b> <i>your own HTML</i> 
       here to make this mailer <span class="
    jojo">look</span> 
       like your site. Data has been submitted to 
    $to! You can
       also put <table><tr><td>stuff</td></tr></table> after
       the confirmation text <blockquote>also</blockquote>"
    ;

    mail($to$subject$body);

    } else {

    echo 
    "blarg!";

    }
    ?>

  3. #3
    Tried that ... got errors on line 13.

    Quote Originally Posted by NeoDreamer View Post
    PHP Code:

    <?php
    if(isset($_POST['submit'])) {

    $to "you@you.com";
    $subject "Form Tutorial";
    $name_field $_POST['name'];
    $email_field $_POST['email'];
    $message $_POST['message'];
     
    $body "From: $name_field\n E-Mail: $email_field\n Message:\n $message";
     
    echo 
    "<b>You put</b> <i>your own HTML</i> 
       here to make this mailer <span class="
    jojo">look</span> 
       like your site. Data has been submitted to 
    $to! You can
       also put <table><tr><td>stuff</td></tr></table> after
       the confirmation text <blockquote>also</blockquote>"
    ;

    mail($to$subject$body);

    } else {

    echo 
    "blarg!";

    }
    ?>

  4. #4
    PHP Code:
    <?php
    if(isset($_POST['submit'])) {

    $to "you@you.com";
    $subject "Form Tutorial";
    $name_field $_POST['name'];
    $email_field $_POST['email'];
    $message $_POST['message'];
     
    $body "From: $name_field\n E-Mail: $email_field\n Message:\n $message";
     
    echo 
    "<b>You put</b> <i>your own HTML</i> 
       here to make this mailer <span class=\"jojo\">look</span> 
       like your site. Data has been submitted to 
    $to! You can
       also put <table><tr><td>stuff</td></tr></table> after
       the confirmation text <blockquote>also</blockquote>"
    ;

    mail($to$subject$body);

    } else {

    echo 
    "blarg!";

    }
    ?>

  5. #5
    Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/public_html/sos/mailer.php on line 13


    Quote Originally Posted by NeoDreamer View Post
    PHP Code:
    <?php
    if(isset($_POST['submit'])) {

    $to "you@you.com";
    $subject "Form Tutorial";
    $name_field $_POST['name'];
    $email_field $_POST['email'];
    $message $_POST['message'];
     
    $body "From: $name_field\n E-Mail: $email_field\n Message:\n $message";
     
    echo 
    "<b>You put</b> <i>your own HTML</i> 
       here to make this mailer <span class=\"jojo\">look</span> 
       like your site. Data has been submitted to 
    $to! You can
       also put <table><tr><td>stuff</td></tr></table> after
       the confirmation text <blockquote>also</blockquote>"
    ;

    mail($to$subject$body);

    } else {

    echo 
    "blarg!";

    }
    ?>

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
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012