problem quote in table

problem quote in table

joly hervejoly herve Posts: 3Questions: 0Answers: 0

Hello,
I have a problem, when I save a data containing a quote ("'") in return I receive "\'", I have my database (wordpress) in the format utf8_general_ci, in my file config.php j have put "dsn" => "charset = utf8"
But that does not work, the display is good it is at the recording that there is problem. Can you help me please

Replies

  • joly hervejoly herve Posts: 3Questions: 0Answers: 0

    I found the problem, as I load "load.php" from wordpress the magic quotes are added.
    I added
    $ _POST = array_map ('stripslashes_deep', $ _POST);
    after loading the load.php

  • allanallan Posts: 61,771Questions: 1Answers: 10,112 Site admin

    Ouch - you've got magic quotes enabled on the server? What version of PHP are you using? I thought the new ones removed that.

    Allan

  • joly hervejoly herve Posts: 3Questions: 0Answers: 0

    php 7 and magic quotes are not installed on my server. it's wordpress that forces the magic quote. as I load the file load.php in my php file before instantiating datatable the variables that arrived in POST were with magic quote. problem solved thanks allan

This discussion has been closed.