Could someone provide me a function that will clean through posted text. I will add it to my class.

Could someone provide me a function that will clean through posted text. I will add it to my class.
Don't know why I posted it in a class...but there you go.PHP Code:class misc
{
function clean($var)
{
$var = htmlspecialchars( $var, ENT_QUOTES );
if( get_magic_quotes_gpc( ) ) {
$var = stripslashes( $var );
}
$var = str_replace( "\"", "", $var );
$var = htmlentities( $var );
$var = mysql_real_escape_string( $var );
return $var;
}
}
Sorry, internet messed up and I didn't think the post was made -.-
Last edited by Invent; 02-10-2007 at 12:12 AM.
It was
Thanks mate +REP
Want to hide these adverts? Register an account for free!