1 year ago
#167623
vip4rk
How to get line-breaks displayed while input in a textarea?
After several hours of research, I am still stucked and unable to solve my problem which is this one : get displayed the break line (enter button) input by the user in a textarea.
Indeed, I am trying to code a website with some articles. These articles are input in a user textarea and saved in a database. Then I display them in a Home page. But here is the problem =>
- either I get an output with no break line;
- either I get an output with break line (due to a nl2br function before saving the text in the Db) but in this case I can't click the "Read more" button in the concerned article on the home page.
About this 2nd issue => as the content is noted in the URL link (read.php?title=PHP&content=PHP ...) I am thinking the
tag might make the link unworking?
By the way if I right click the Read more button and select open in a new tab, it is working..
Thank you in advance for your help,
Vip4rk
php
textarea
line-breaks
article
nl2br
0 Answers
Your Answer