So I wan't to create this function:
public static function formclean($string) {
htmlentities(strip_tags(trim($string)));
return $string;
}
Where the string gets prepared for MySQL database entry. However, when I call my function I:
$class->string = Class::formclean($_POST['string']);
It doesn't return the prepared string. When I write the next bit of code it does work.
$class->string = htmlentities(strip_tags(trim($_POST['string'])));
What am I doing wrong?