This topic is locked

Rich text field passed to a session variable

9/21/2006 5:46:09 AM
PHPRunner General questions
A
andyjames author

Hi
I am passing the contents of a text area using the PHPRunner rich text editor to a session variable.

The session variable is then used as the message part of the mail function.

Everything works fine apart from the e-mail containing opening ' and closing ' single quotes and line breaks including \r\n
I pass the content of the field using a BeforeAdd event as follows:
$_SESSION["messagefield"]=$values["bodytext"];
Any ideas on how to remove the field wrappers ' ... ' and Carriage return: \r and Linefeed: \n marks?

Thanks for any help!

D
Dale 9/21/2006

I also load an email body from a comment table which stores email templates I wish to batch email.

I load the field as you have and then when I build the email body I have coded it as below.
......

echo "<tr><td colspan=\"5\">";

echo html_special_decode($_SESSION['comment']);

echo "</td></tr>";

......
Works for me.