So I found a small flaw in the comment system I've made. When someone presses enter while typing a comment and puts in a new line, it doesn't show when the comment is gotten from the mysql database.

I don't have any "if (new line within comment, add newline to mysql)" or some stuff like that simply because i'm not too sure how to do it.

Any ideas on how this should be done? Example code would be helpful!

Recommended Answers

All 2 Replies

Member Avatar for diafol

look up nl2br() in the php manual

I should pay you^^ lol. The amount of times you've helped me is too high.

Cheers once again!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.