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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting the body of an email question 1

Status
Not open for further replies.

jewel464g

Technical User
Jul 18, 2001
198
US
Ok, this should be my last email question. I'm really learning a lot and I appreciate all the help I have recieved on this forum. My question is: When people type a message in the form, for example:

Doesn't this work nicely.

When that message is emailed it appears as:
Doesn\'t this work nicely.

Is there a way to prevent it from inserting the slash in the emailed message?

This is the code I'm using to send the email:
<?
mail(&quot;username@email.com&quot;, $subject, &quot;Name: $name \nEmail: $email \nSubject: $subject \nComments: $comments&quot;);
?>
 
$text=stripslashes($text);

Now you can have a small problem with double_quotes. Try with something with double_quotes(&quot;).

If you have problems, just put:

$text=str_replace(&quot;\&quot;&quot;,&quot;\\\&quot;&quot;,$text);

You should have your problem solved. Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Well ... i just made some tests.

$message=stripslashes($message) should work. Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top