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. Link to comment https://forums.phpfreaks.com/topic/77394-solved-sanitize/ Share on other sites More sharing options...
Demonic Posted November 14, 2007 Share Posted November 14, 2007 That function doesn't exist. ??? Link to comment https://forums.phpfreaks.com/topic/77394-solved-sanitize/#findComment-391794 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. Link to comment https://forums.phpfreaks.com/topic/77394-solved-sanitize/#findComment-391798 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. Link to comment https://forums.phpfreaks.com/topic/77394-solved-sanitize/#findComment-391800 Share on other sites More sharing options...
elis Posted November 14, 2007 Author Share Posted November 14, 2007 Oh, okay. Thank you, my mistake. Link to comment https://forums.phpfreaks.com/topic/77394-solved-sanitize/#findComment-391802 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.