Jump to content


Photo

line breaks in forms


  • Please log in to reply
2 replies to this topic

#1 skippyscage

skippyscage
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 01 March 2004 - 04:37 PM

Im having trouble getting line breaks to format from a record in MySql that has been input via a form, when it's displayed in the .php page.

I know this has something to do with n12br but I have no idea how to code this.

I basically need the .php page to format the text exactly the same as entered in the form - i.e. a line break where the user has hit the return key between lines of text.

here is the sample code...

<?php echo ($row_qMemberTracking['comments']); ?>

#2 skippyscage

skippyscage
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 01 March 2004 - 04:43 PM

got it!

after a week of looking and struggling and finally posting, I work it out!

n12br should be nl12br

<?php echo nl12br($row_qMemberTracking['comments']); ?>

sorry for wasting any time - but at least it's here for future ref

#3 skippyscage

skippyscage
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 12 April 2004 - 03:48 PM

got it!

after a week of looking and struggling and finally posting, I work it out!

n12br should be nl12br

<?php echo nl12br($row_qMemberTracking['comments']); ?>

sorry for wasting any time - but at least it's here for future ref

n12br should be nl12br

<?php echo nl12br($row_qMemberTracking['comments']); ?>



got that completey wrong

should be

nl2br

ie
<?php echo nl2br($row_qMemberTracking['comments']); ?>




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users