Saving formatting in variables

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi All,
I would appreciate a pointer on this problem, if you please.

I am writing a 'tell a friend' page for my www site. Essentially, the
user opens the page, fills out a form, click submit, the text of the
email that will be sent to their friend is presented on screen. If they
like it, they press send, and an email is sent to their friend.

The main body of the email is in a variable, which contains paragraph
formatting etc. The problem I am having is that the paragraph
formatting is not transmitted to the html page that they review, and
that page looks messy. Of course, I tried putting in html formatting in
the variable, but then this literally appears in the email. Does anyone
know a way of solving this problem?

Ta in advance,

Re: Saving formatting in variables

Jim contained the following:

Quoted text here. Click to load it

1. Use nl2br() on the output to the screen.
2. Use <pre></pre>

Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs

Re: Saving formatting in variables

Hi Geoff,

Thanks, much appreciated,


Geoff Berrow wrote:
Quoted text here. Click to load it

Site Timeline