Reply to Newline issue

Your name:

Reply:


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?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация