Ways I can protect my site excluding XSS and Sql injection?

前端 未结 6 1323
Happy的楠姐
Happy的楠姐 2021-02-10 00:38


So, members of my website can post topics, replies, comments, edit them and so on. I always use htmlspecialchars and addslashes for html inputs to

6条回答
  •  鱼传尺愫
    2021-02-10 01:17

    When inserting data into database, use prepared statements. PDO are better than mysql_real_espace_string.

    When displaying data, such as comments, posts, use htmlentities.

提交回复
热议问题