Page 4 of 4 FirstFirst ... 234
Results 31 to 34 of 34

Thread: Upload Form

  1. #31
    Join Date
    Oct 2006
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by pssparkman View Post
    Okay, after some looking around on the net, I have found an script that contained the necessary parts for sending out emails and it works! Now the problem, the email doesn't come to me with line breaks in it as I have put them in using <br>. Is there a specific way or another piece of code that I am missing or need to us? I need to also know how to create links and a bulleted list in the email as well as my attempts with html code inside the email have failed.

    Use the wonderful function:
    PHP Code:
    $goodText br2nl("badText"); 
    It might help.

  2. #32
    Join Date
    Oct 2006
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    *owned*

  3. #33
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Quote Originally Posted by Shotgun Ninja View Post
    Use the wonderful function:
    PHP Code:
    $goodText br2nl("badText"); 
    It might help.
    that is the abuse of the break-line tag.

    anywhere he wants to have a new line insert the wildcard \n

    Code:
    $message = "This is \n some message.\n\t please refrain from doing that.";
    would be displayed in the email as
    Code:
    This is
    some message.
          please refrain from doing that.

  4. #34
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    that is the abuse of the break-line tag.
    It is. However, your proposed solution won't work since s/he evidently is sending HTML mail (also, \n is not a wildcard, it's an escape sequence: a wildcard is a character that matches a range of other characters, such as * in a DOS or bash). Instead, you need to wrap the offending text in a container with white-space: pre; like so:
    Code:
    $goodText = sprintf('<div style="white-space: pre;">%s</div>', $badText);
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

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