Jump to content

PHP forums textarea support


JackCode

Recommended Posts

So I have a simple forums that allows you to speak to different members but they're a lot of problems with it. So first off when you reply you can't include a new line. Another problem is symbols, there change to weird black symbols. 

 

Also if you post text with no spaces then the text will expand out of its div. My forums is:

 

Ransack.comze.com/circle.php

 

example of random symbols: http://ransack.comze.com/topic.php?id=20

example of text going out of div: http://ransack.comze.com/topic.php?id=15

Link to comment
https://forums.phpfreaks.com/topic/286003-php-forums-textarea-support/
Share on other sites

  Quote

 

 

So first off when you reply you can't include a new line

Actually the newlines are included, the problem is the web browser ignores whitespace characters such as newlines, in order to inforce newlines in HTML you need to use the <br> (line break) tag. PHP has a function that converts whitespace newline characters into line break tags for you. Try using nl2br when you output the text for the forum posts.

 

  Quote

 

 

example of text going out of div: http://ransack.comze...topic.php?id=15

Use CSS to apply wordwrap to the .post-content class to break long continuous letters

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.