How to automatically wrap long text in PHP or SQL?

Mash10 Posted messages 1 Status Membre -  
jordane45 Posted messages 30426 Registration date   Status Modérateur Last intervention   -
Hi, I'm creating a site with a form, I'm doing it with a forum, I save comments in a database (I use MySQL), the problem is that if a user writes a text without line breaks, the message is stored in the table that way and displays the same without line breaks. I have set a size for the container but it doesn't change anything, I would like to know if there is a way to fix this issue, thank you in advance.

2 réponses

NHenry Posted messages 2510 Registration date   Status Modérateur Last intervention   386
 
Normally, the browser takes care of automatically adding line breaks during display.

--
I mainly work in VB6 and VB.NET, with a bit of C#, but moderation often leads me to other languages.
In VB.NET, remember to enable "Option Explicit" and "Option Strict".
0