PDA

View Full Version : Problem posting to database



goflish
12-05-2007, 09:32 PM
1) openWYSIWYG 1.01 beta:

2) http://www.dynamicdrive.com/dynamicindex16/openwysiwyg/index.htm

3) Describe problem: When the source of the editor is posted to my database for some reason it is adding "\" in the following locations...


<FONT style=\"BACKGROUND-COLOR: #996600\">alfjksa;lfjksadl;jfsladjflsakjfl;kjflkj</FONT>

the random text is just a test I did, the source on the editor shows correctly, it's just after the php script posts the info to the mysql database it is adding in the extra bit of code.

Can anyone help?

thetestingsite
12-05-2007, 09:36 PM
you may want to look into stripcslashes (http://php.net/stripcslashes) or something to that effect for it.

Hope this helps.

goflish
12-05-2007, 09:59 PM
thanks, that did the trick -

It worked like this for anyone else that comes across this problem:

wherever your output is going to display on your site put in this code:

<? php echo stripcslashes ("$description"); ?>

change $description to whatever your string/variable is.