|
Posted by Jon on 11/04/05 17:44
All,
I'm currently building a small application that will allow one of our users
to submit news articles to his site, and I have a problem that I simply
can't figure out.
What I need to do is make it so if he were to copy/paste an article into a
<textarea>, he will not have to enter any HTML or newline characters,
however to display the artciles properly we'll need those in the DB.
My question: Is it possible to pickup the actual newlines that are hidden
from the front-end and submit a query that puts text into MySQL AS IS
instead of having it go in as one block of text.
I know I've also ran a query that submitted the spaces and newlines into the
DB (although there were no symbols in the DB holding these, it was simply
whitespace and breaks that were not otherwise indicated) - However, when I
output this to a browser, all of these spaces and breaks are taken away. I
know I could go in and setup newline's everywhere we need one and simply use
nl2br() or something to replace the strings, but I don't want the user to be
forced to do this.
Ideas?
Navigation:
[Reply to this message]
|