简体   繁体   English

CK编辑器数据无法在数据库中正确保存

[英]CK Editor data not save properly in database

I am using CK editor library with codeigniter. 我正在使用带有codeigniter的CK编辑器库。 I have post data with ck editor textarea. 我用ck编辑器textarea发布了数据。 Data is post in format like :- 数据的格式如下: -

  '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 posted correctly. 这里的数据正确发布。 but when i passed into insert method for inserting into it table then the format is destroy which i post:- 但是当我传入插入方法插入表格然后格式是销毁我发布: -

This is show 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 can i properly insert data into database. 如何正确地将数据插入数据库。

first of all it would be useful to see your save-to-db code 首先,看看你的保存到数据库代码会很有用
but i assume you are using double quotes in your sql statement? 但我假设你在sql语句中使用双引号? replacing those with single should do the trick. 用单身替换那些应该可以解决问题。
if the problem occurs on POST than you should show both the initial form and the receiving php script. 如果问题发生在POST上,你应该同时显示初始表单和接收php脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM