Jump to content

Any body know the function code for classes for clean


Recommended Posts

if ($_POST['submit'] != ""){

$_POST['changedesc'] = Clean($_POST['changedesc']);


get this when trying to change banner

Fatal error: Call to undefined function Clean() in /home/blaz1986/public_html/banner.php on line 10

function clean($str = '', $html = false) {

if (empty($str)) return;

if (is_array($str)) {

foreach($str as $key => $value) $str[$key] = clean($value, $html);

} else {

if (get_magic_quotes_gpc()) $str = stripslashes($str);

if (is_array($html)) $str = strip_tags($str, implode('', $html));

elseif (preg_match('|<([a-z]+)>|i', $html)) $str = strip_tags($str, $html);

elseif ($html !== true) $str = strip_tags($str);

$str = trim($str);

}return $str;


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...