Daney11 Posted December 7, 2007 Share Posted December 7, 2007 // 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 Quote Link to comment Share on other sites More sharing options...
Yesideez Posted December 7, 2007 Share Posted December 7, 2007 Have a read of this topic: http://www.phpfreaks.com/forums/index.php/topic,170844.0.html Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.