BR's in a textarea?

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

    BR's in a textarea?

    Hi,

    I have a form with a textarea. When I try to get the content using e.g.
    $_POST["textfieldn ame"] the BR's are stripped out? How could this be fixed?

    Greetz,

    Roger


  • Pedro

    #2
    Re: BR's in a textarea?

    Roger Godefroy wrote:[color=blue]
    > I have a form with a textarea. When I try to get the content using e.g.
    > $_POST["textfieldn ame"] the BR's are stripped out? How could this be fixed?[/color]

    <?php
    $fixed = nl2br($_POST["textfieldn ame"]);
    ?>

    Check the manual: http://www.php.net/nl2br
    [for some reason this URL is not working for me right now]

    --
    I have a spam filter working.
    To mail me include "urkxvq" (with or without the quotes)
    in the subject line, or your mail will be ruthlessly discarded.

    Comment

    • Roger Godefroy

      #3
      Re: BR's in a textarea?

      thnxz... didn't know about the newline formatting...

      "Pedro" <hexkid@hotpop. com> schreef in bericht
      news:blbub7$adu l4$1@ID-203069.news.uni-berlin.de...[color=blue]
      > Roger Godefroy wrote:[color=green]
      > > I have a form with a textarea. When I try to get the content using e.g.
      > > $_POST["textfieldn ame"] the BR's are stripped out? How could this be[/color][/color]
      fixed?[color=blue]
      >
      > <?php
      > $fixed = nl2br($_POST["textfieldn ame"]);
      > ?>
      >
      > Check the manual: http://www.php.net/nl2br
      > [for some reason this URL is not working for me right now]
      >
      > --
      > I have a spam filter working.
      > To mail me include "urkxvq" (with or without the quotes)
      > in the subject line, or your mail will be ruthlessly discarded.[/color]


      Comment

      Working...