Anyone for a quickie??? :)

Discussion in 'PHP' started by sitefever, Sep 8, 2007.

  1. #1
    I am able to enter text into a textarea, save it to the database and send that text in an email later using the following line:

    $message= stripslashes($this->settings[message_text']);

    I want to be able to enter HTML into the textarea and send it to the email. Simple <br> <a href> etc.

    How should I change this line to output as HTML?

    Thanks for your time!!!
     
    sitefever, Sep 8, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    This line does not send any emails. What does $message contain after pulling it from the database? Is the HTML stripped our before entering or after pulling it?

    You have to change the content-type headers in the actual function that sends the mail. This line of code does not help.
     
    nico_swd, Sep 8, 2007 IP
  3. sitefever

    sitefever Banned

    Messages:
    782
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Right now the database is preserving the html that I enter in the textarea, if that helps. Here's an example straight from the database:

    A cool search engine is<br><a href=\"http://google.com\">Google!</a>
     
    sitefever, Sep 8, 2007 IP
  4. sitefever

    sitefever Banned

    Messages:
    782
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I've got it figured out guys, thanks. The problem was the MIME type.
     
    sitefever, Sep 8, 2007 IP