Page 1 of 1

trim(strip_tags(mysql_real_escape_string())) or.....

Posted: Tue Apr 08, 2008 9:55 am
by kryles
Does it make a difference which order you put the three functions?

trim()
strip_tags()

and mysql_real_escape_string() ?

I was working on old code and doing it as

Code: Select all

 
trim(strip_tags(mysql_real_escape_string($_POST['blah ']))) 
 
and then saw an older copy where I was doing

Code: Select all

mysql_real_escape_string(strip_tags(trim($_POST['blah'])))
just wondering if one is safer than the other for some reason or any order is same result

Thanks,