Results 1 to 3 of 3

Thread: Problem posting to database

  1. #1
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Problem posting to database

    1) openWYSIWYG 1.01 beta:

    2) http://www.dynamicdrive.com/dynamici...iwyg/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...

    Code:
    <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?

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    you may want to look into stripcslashes or something to that effect for it.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •