I have a simple contact form on my site that passes the data to a very small PHP script, which in turn passes the data to my e-mail address.
The problem is, there are escape slashes in front of apostrophes and quotation marks. I've looked into it and read about stripslashes and stripcslashes, and have tried every permutation I've seen (and just used my best guess to make some up, to see if they'd work)... But alas, the slashes are still in the submitted data by the time it reaches my inbox.
Could someone tell me where to integrate the stripslahes function into my script? Also, I'd really appreciate any insight you may have on stripslashes vs. stripcslashes, as I've seen both recommended over the other for what seems to be the same purpose.
Here's my script as it exists now:
$email = $HTTP_POST_VARS[email];
$mailto = "bcgm3@bcgm3.com";
$mailsubj = "BCGM3 Studios : Web and Graphic Design : Contact";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Submitted Message Data:\n";
$mailbody = stripcslashes($mailbody);
while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; }
if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); }