Jump to content

Mysql Clean Strings


ahzulfi

Recommended Posts

Hello,

i want to know weather this function is right for my MySql query strings or not

 

function mysql_clean($string){

$string= htmlentities($string);

$string= strip_tags($string);

$string= mysql_real_escape_string($string);

if (get_magic_quotes_gpc())

{

$id = stripslashes($string);

}

 

return $string;

}

Link to comment
https://forums.phpfreaks.com/topic/86666-mysql-clean-strings/
Share on other sites

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.