Jump to content

htmlspecialchars versus mysql_real_escape_string


php_guy

Recommended Posts

It really depends what you intend to do with the data. If it will be inserted into a MySQL database, then mysql_real_escape_string, if it's being redisplayed, then htmlspecialchars or htmlentities and/or strip_tags.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.