SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict trigger's Avatar
    Join Date
    Jun 2003
    Location
    Eagan
    Posts
    342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    parsing apostrophes as \' in mail function?

    I have a form that, when submitted, will send out a email to certain people. Problem is, when they put an apostrophe in, it shows up as a \' . I'm assuming this is because it is escaping out of the php or something like that. How do I fix it? Is it something I can put in the headers or something? Below is an example of what one field of my code looks like, there are nine more fields that get emailed, but they are exactly the same.

    PHP Code:
    $message .= "Company Name: $companyName \n"

  2. #2
    La la la la la bronze trophy lieut_data's Avatar
    Join Date
    Jun 2003
    Location
    Waterloo, ON
    Posts
    1,517
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $companyName stripslashes($companyName); 
    Magic Quotes are probably enabled.

    Cheers!
    My name is Steve, and I'm a super-villian.

  3. #3
    SitePoint Addict trigger's Avatar
    Join Date
    Jun 2003
    Location
    Eagan
    Posts
    342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll give it a try. Thanks again!


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
  •