How do I get rid of the slashes sent in my tell-a-friend's comments? Example? Thanks
<?php $message="<html><body>$comments</body></html>"; //headers mail($receiver,$subject,$message,$headers); ?>
you could try using stripslashes() on the variable.
Where's the example in the above code? Thanks
change:
to:
<?php $message="<html><body>stripslashes($comments)</body></html>"; //headers mail($receiver,$subject,$message,$headers); ?>
Huh uh. I already tried that and it just prints "stripslashes (all the comments)" in the html.
...but this works:
$comments = stripslashes($comments);
Don't ask me what the difference is, however, 'cause me dunno.
You could also use:
<?php $message="<html><body>" . stripslashes($comments) . "</body></html>"; //headers mail($receiver,$subject,$message,$headers); ?>
the problem with Zack's example is that the function name and parentheses becomes part of the string that way, rather than working as a function on the variable.