开发者

htmlspecialchars or mysql_real_escape_string?

I am unsure which one to use in this situation???

$query1 = "SELECT * FROM messages WHERE 
messages.custid='".htmlspecialchars($_SESSION['custo开发者_如何转开发merid'])."' 
ORDER BY messages.id LIMIT $start, $limit ";


use mysql_real_escape_string .. But really, don't do that

instead, install Pear's PDO library, then use a prepared statement for your query


mysql_real_escape_string() is made especialy for Mysql Tables, as the name indicates ;-)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜