CK editor data is not saved properly in the database

I am using CK editor library with codeigniter. I have data to post with ck text editor. The data is sent in a format such as: -

  'active' => string '1' (length=1)
  'restaurant_id' => string '60' (length=2)
  'title' => string 'Test' (length=22)
  'details' => string '<p><strong><span style="font-size:48px">This is test.</span></strong></p>' (length=75)

      

Here the data is published correctly. but when i went to insert method to insert the table into it then the format is destroyed which i will post: -

It looks like

array (size=8)
  'active' => string '1' (length=1)
  'restaurant_id' => string '60' (length=2)
  'title' => string 'Test' (length=22)
  'details' => string '<p><strong><span  is test.</span></strong></p>' (length=46)

      

How to insert data into the database correctly.

+3


source to share


1 answer


in the first place it would be helpful to see your save-to-db code
but I'm assuming you are using double quotes in your sql statement? replacing those singles should do the trick.
if the problem occurs in POST, you should show both the initial form and the receiving php script.



0


source







All Articles