ohdang888 Posted August 5, 2008 Share Posted August 5, 2008 would this work to trim and stop db attacks??? function clean($var){ $var = mysql_real_escape_string(trim($var)); return $var; } Quote Link to comment https://forums.phpfreaks.com/topic/118274-var-cleaning-function/ Share on other sites More sharing options...
wildteen88 Posted August 5, 2008 Share Posted August 5, 2008 Yes that is fine to help prevent sql injection attacks Quote Link to comment https://forums.phpfreaks.com/topic/118274-var-cleaning-function/#findComment-608647 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.