You are here: PHP an " « PHP Programming Language « IT news, forums, messages
PHP an "

Posted by G0ng on 10/24/05 12:26

Hello, I have the following problem.

I have a Mysql db field which holds an html code (e.g. <p
style="text-decoration: underline;">lala</p>).
To insert this code I use the ricEdit javascript controll with which you
create a textarea and format the text. When I submit the value it is
stored in the db.

I want to be able to edit this code (from a web form) so I want to
retrive the code and pass it to the javascript control. I get it to a
var like: $line["text"].
If I do <input type="text" value="<?php echo $line["text"];?>"> there is
a problem with the " in the html code. I trie to do a
addslashes($line...) but what I get is something like:

original: <p style="text-decoration: underline;">lala</p>
addslashed: <p style=\"text-decoration: underline\>lala</p> (last " is
ommited")

so everything is messed. I also tried str_replace('"','\\"',$line[]) but
the same thing happens.

Is there a problem with ;" ??? How can I overcome it?

 

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

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