elis Posted November 14, 2007 Share Posted November 14, 2007 Could somebody please explain the sanitize(); function and whether it's wise to use it in adjacent to $valude = mysql_real_escape_string(strip_tags(trim($_POST['value']))); in regards to security? I've tried searching for the function on PHP.net and through Google but came up short. Quote Link to comment Share on other sites More sharing options...
Demonic Posted November 14, 2007 Share Posted November 14, 2007 That function doesn't exist. ??? Quote Link to comment Share on other sites More sharing options...
elis Posted November 14, 2007 Author Share Posted November 14, 2007 That's weird. I found it by mistake here: http://us3.php.net/manual/en/function.mysql-real-escape-string.php In the user comments several people mentioned the function but like you said, it seems like doesn't exist. Here's a sample code somebody posted <?php function sanitize($input){ if(is_array($input)){ foreach($input as $k=>$i){ $output[$k]=sanitize($i); } I'm still learning PHP so the chances that I misunderstood this is extremely high. Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted November 14, 2007 Share Posted November 14, 2007 That is a user created function that someone wrote up. Quote Link to comment Share on other sites More sharing options...
elis Posted November 14, 2007 Author Share Posted November 14, 2007 Oh, okay. Thank you, my mistake. 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.