[thelist] Plain Text Newsletter in PHP with Problems

Rob Smith rob.smith at THERMON.com
Thu Mar 18 10:38:47 CST 2004


I'm trying to create a simple newsletter form in PHP and I'm running into a

First off there is a subject text field, a newsletter textarea field, a
preview and submit button of which both are type="submit". 

The preview button is what I'm focusing on today. The form submits to a PHP

if ($_GET["Preview"] == "Preview") { 
  header("Location: http://www.mysite.com/PreviewNewsletter.php?newsletter="
. $_GET["newsletter"] ."&subject=" . $_GET["subject"]);

At this point this works fine if the newsletter contained a single line of
text. This will never happen for real. What will happen is multiple lines:

Subject: test
Newsletter: This is a test with a 
hard carriage return


What breaks the code for some odd reason is the :  %0D%0A

Is this ascii for carriage return line feed as in the ASP version vbCRLF?

If so, do I do a replace for these characters and how? and do you think
it'll fix this problem

Thanks PHP guru's


More information about the thelist mailing list