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; } 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 Link to comment https://forums.phpfreaks.com/topic/118274-var-cleaning-function/#findComment-608647 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.