Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mail() problem with escape characters 1

Status
Not open for further replies.

peterv6

Programmer
Sep 10, 2005
70
US
When I use the mail()function, the resulting email that is sent contains escape characters in front of apostrophes, etc.

Example: I don\'t know why an apostrophe causes escape backslashes to appear in the message being sent.

I'm new to PHP, so I'd really appreciate it if someone would help me out with getting around this problem.

Thanks in advance.

PETERV
Syracuse, NY &
Boston, MA
 
try running stripslashes() on the mail body

 
jpadie, this fixes my problem, just what I needed. Thank you very much for the answer!
PV

PETERV
Syracuse, NY &
Boston, MA
 
no worries.
you probably have magic_quotes_gpc() turned on in your php.ini profile.
 
I'm sure you're right. The php.ini file for my php is hosted by my isp, so I don't have access to it.
Thanks again.

PETERV
Syracuse, NY &
Boston, MA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top