Do you have a question? Post it now! No Registration Necessary. Now with pictures!
October 24, 2005, 9:26 am
rate this thread
I have a Mysql db field which holds an html code (e.g. <p
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
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
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?
Re: PHP an "
Ok this is ok for the HTML part. It is displayed correctly. But what I
var ed=new EDITOR();
but the .create function needs the argument to be <b> and not <b$gt;