Decoding mysql_real_escape_string() for outputting HTML

前端 未结 9 2310
萌比男神i
萌比男神i 2020-12-16 16:50

I\'m trying to protect myself from sql injection and am using:

mysql_real_escape_string($string);

When posting HTML it looks something like

9条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-16 17:24

    I was wondering why this routine doesn't have a accompanying decoder routine. Its probably interpreted by MySQL the exact same way as if it were not escaped. You get the un-escaped results when you do a $row=mysql_fetch_array($res, MYSQL_ASSOC)';

提交回复
热议问题