Jump to content

This Function


Daney11

Recommended Posts

// Start String Function
function escape_data($data) {
   global $connect;
   if (ini_get('magic_quotes_gpc')) {
   $data = stripslashes($data);
}
   return mysql_real_escape_string(trim($data), $connect);
}
// End String Function

 

I have this function and i use escape_data($blah); etc.. Would this be the best function to use or would anyone do anything a little bit different? For security, i.e SQL Injections.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/80690-this-function/
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.