How to automatically wrap long text in PHP or SQL?

Mash10 Posted messages 1 Status Member -  
jordane45 Posted messages 30427 Registration date   Status Moderator 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 answers

  1. NHenry Posted messages 15235 Registration date   Status Moderator Last intervention   387
     
    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