Jump to content


Photo

Formatting


  • Please log in to reply
2 replies to this topic

#1 MadDawgX

MadDawgX
  • Members
  • PipPipPip
  • Advanced Member
  • 40 posts

Posted 27 October 2006 - 08:55 PM

Hey there.

I've got a comment type of system made where users can submit a form and its added to a database, but it always comes out as one big paragraph.

Eg:

This thing is Great.

Awesome work!

- So-and-So

Would come out as:

This thing is Great. Awesome work! - So-and-So

What do I need to do so it'll be in its paragraphs?

#2 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,017 posts

Posted 27 October 2006 - 08:59 PM

When you extract it from the db to display on the page use

echo nl2br($db_comments);
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#3 MadDawgX

MadDawgX
  • Members
  • PipPipPip
  • Advanced Member
  • 40 posts

Posted 27 October 2006 - 09:33 PM

thanx.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users