CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Stripslashes

Print topic Send  topic

Author Message
madmic

Posts: 11
Posted: 11/27/2007, 7:03 AM

I need to strip slashes from Ad_text when sending an email...

I have the email working great except for the html code breaking the Ad_text here is what I have and I don't know where to ad the stripslashes.

HELP PLEASE
  
  
global $classified;  
    ini_set("SMTP", "xxxxxxxx.xxxxxxx.xxxxxxxx");  
    $to = $Container->Ad_email->GetText();  
	$subject = $Container->Ad_catch->GetText();  
	$message = 'The following ad had been posted to the  Swap Meet  '."\r\n"."\r\n";    
	$message .= $Container->Ad_text->GetText()."\r\n"."\r\n";  
	$message .='This ad will expire on   ';  
	$message .= $Container->Ad_end_date->GetText();  
    $from = 'lmccormick@xxxxxxxx.xxx';  
    $additional_headers = "From: $from\nReply-To: $from\nContent-Type: text/plain, Bcc:lmccormick@xxxxxxx.xxx";  
    mail ($to, $subject, $message, $additional_headers);  
    ini_restore("SMTP");  
[ /code] 
                  
_________________
Madmic
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 12/06/2007, 7:51 PM

madmic
Here are some PHP functions that may help you: stripcslashes, stripslashes or str_replace

These functions will strip the slash out of the string.

Hopefully this will help you.
View profile  Send private message
madmic

Posts: 11
Posted: 12/10/2007, 7:39 AM

Thanks,

I should have put in the response I recieve from support and not left this out here hanging.

Actually the answer is quite simple.

by changing the the content type to Content-Type: text/html it manages the html content without needing the functions I had Content-Type:text/plain

Hope this helps someone else
Thanks for repling though mamboBROWN nice to know someone is out there!

Lori
8-)
_________________
Madmic
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.