Inserting html code in a mysql table

后端 未结 11 829
我在风中等你
我在风中等你 2020-12-11 01:14

I use joomla to manage a website... and i am developing a stand alone php application that will insert and modify data into the tables that are used by joomla to store the

11条回答
  •  天涯浪人
    2020-12-11 01:50

    Well..Debugged it.. Turns out the problem was after all not with the escaping function...

    Check out the query :

    UPDATE $jos_content
    SET    introtext = '$intro_code',
           fulltext  = '$article_code'
    WHERE  id = '$article_id'";
    

    You can see the 'fulltext' field... Apparently, the word "fulltext" is a mysql keyword... To be precise,it's a field type like TEXT, INT, MEDIUMTEXT etc...

    I changed the query to this

    "UPDATE $jos_content
    SET    $jos_content.introtext = '$intro_code',
           $jos_content.fulltext  = '$article_code'
    WHERE  $jos_content.id = '$article_id'";
    

    And voila...!!!!

提交回复
热议问题