Any alternatives to using <pre> when displaying db text?
Posted: Sat May 17, 2008 11:45 pm
I have a system that allows users to add an article to a mysql database by inputting the article into a textbox and then simply inserting it into the database. The problem (as you probably already know) is that when you go to select (display) that same article from the database it is no longer formatted with line breaks. I don't want my users to have to know to input a <br /> tag every time they want a line break.
The PRE tag just leads to mayhem since it is highly unreliable. Is there any other way to make sure that the article has the same line breaks (when displayed from the database) as when the user inputed it.
I am open to any method required to get this done. Thanks in advance!
The PRE tag just leads to mayhem since it is highly unreliable. Is there any other way to make sure that the article has the same line breaks (when displayed from the database) as when the user inputed it.
I am open to any method required to get this done. Thanks in advance!