Inserting html code in a mysql table

后端 未结 11 840
我在风中等你
我在风中等你 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:42

    You should not need slashes. The only thing that will cause a problem during normal inserts is the quotes, and mysql_escape_string() should handle that excepting charset issues. Try mysql_real_escape_string() as well.

    Also, note that storing raw user-supplied HTML in the database can lead to security issues. Consider using something like bbcode or markdown instead.

提交回复
热议问题