You are here: Reading text with newline from db via php and placing in client javascript variable « PHP Programming Language « IT news, forums, messages
Reading text with newline from db via php and placing in client javascript variable

Posted by Randell D. on 07/26/07 15:49

Folks,

I am cross-posting on purpose, even though my problem appears to be
javascript related there might well be a function unknownst to me that
will help resolve the problem before sending to the client...

Basically I have a textarea box that is saved from client via php into
my mysql database.

When I later try to restore the data I can see it in the HTML source
from my browser (I'm using latest version of Firefox) but an error in
the javascript console tells me the variable is not terminated... This
is because there is a newline character in my text.

I've tried addslashes and htmlentities in php but its not worked for
me - can someone advise me of what the solution/workround is?

(Please reply to the group and not me to help others)

thanks!

 

Navigation:

[Reply to this 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

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