Saving formatting in variables

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jim

    Saving formatting in variables

    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,
    Jim

  • Geoff Berrow

    #2
    Re: Saving formatting in variables

    Message-ID: <1159830218.822 326.22480@m73g2 000cwd.googlegr oups.comfrom
    Jim contained the following:
    >Does anyone
    >know a way of solving this problem?
    1. Use nl2br() on the output to the screen.
    or
    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 http://www.ckdog.co.uk/rfdmaker/

    Comment

    • Jim

      #3
      Re: Saving formatting in variables

      Hi Geoff,

      Thanks, much appreciated,

      Jim

      Geoff Berrow wrote:
      Message-ID: <1159830218.822 326.22480@m73g2 000cwd.googlegr oups.comfrom
      Jim contained the following:
      >
      Does anyone
      know a way of solving this problem?
      >
      1. Use nl2br() on the output to the screen.
      or
      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 http://www.ckdog.co.uk/rfdmaker/

      Comment

      Working...