没法了 mysql插入html问题

fudg1211 fudg1211 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
$chat_content=$player[p_name]."向世人展示了<a class=\"display_item\" onclick=\"item_tips(this)\" title=\"$item_tips\">".$item[item_name]."</a>";

$item_tips是一大段的html代码

错误提示
the right syntax to use near 'class="display_item" onclick="item_tips(this)" title="<table style='border: m' at line 1 mysql error number: 1064

应该指的是里面含有单引号' 如果去掉title=\"$item_tips\" 就可以插入

那我现在要怎么样才能插入这段html代码 用了htmlentities和htmlspecialchars都不管用

急

$sql="insert into ks_chat (chat_readname,chat_content) values ('世界',$chat_content)";
急
...全文

相关推荐

评论 3
收藏 已收藏
分享
返回顶部
fudg1211
基础编程 21,889 成员 140,329 内容