acroporas Posted February 15, 2007 Share Posted February 15, 2007 I have a "contact me" form. The user fills in the from, clicks submit and I have Php email it to me. Here's the code I use to send the email. $headers = "From: " . $_POST["from"]; mail($MyEmailAddress,$_POST["Subject"],$_POST["body"],$headers); This works fine, in that it sends me the email. However when there are " or ' symbols in the message, they are sent as \" or \' Why does this happen, and how do I fix it so that the email recieved shows " and '. Also, are there other symbols that I will discover later on don\'t work either. Quote Link to comment Share on other sites More sharing options...
Kemm Posted February 15, 2007 Share Posted February 15, 2007 I have a "contact me" form. The user fills in the from, clicks submit and I have Php email it to me. Here's the code I use to send the email. $headers = "From: " . $_POST["from"]; mail($MyEmailAddress,$_POST["Subject"],$_POST["body"],$headers); This works fine, in that it sends me the email. However when there are " or ' symbols in the message, they are sent as \" or \' Why does this happen, and how do I fix it so that the email recieved shows " and '. Also, are there other symbols that I will discover later on don\'t work either. I actually have the same problem with my HTML to Text converter. All " & ' has a backslash in front of it. Would also appricate some help with this Quote Link to comment Share on other sites More sharing options...
Balmung-San Posted February 15, 2007 Share Posted February 15, 2007 stripslashes() should do just what you need. Quote Link to comment Share on other sites More sharing options...
Kemm Posted February 15, 2007 Share Posted February 15, 2007 stripslashes() should do just what you need. You are really helpfull Balmung-San! Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.