Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

strange, yet probably obvious php error


ghost's Avatar
0 0

Okay, this is my first post, so bear with me. I am coding a blog-type site, and I'm trying to filter out some HTML tags from files. I'm using the callback of the filter_var() function. I get a:

Fatal error: Call to undefined function filter_var() in /home/benjamin/public_html/homeofben/blogview.php on line 18

I don't know why the function wouldn't exist, as I am using PHP 5 and www.w3schools.com says the filter_var() function exists in PHP 5. However, I have a feeling this is an obvious thing. Help would be appreciated.


ghost's Avatar
0 0

why not just use htmlentities() ?


Uber0n's Avatar
Member
0 0

only_samurai wrote: why not just use htmlentities() ?

That's the best way to do it ^^


ghost's Avatar
0 0

Uber0n wrote: [quote]only_samurai wrote: why not just use htmlentities() ?

That's the best way to do it ^1

What has everyone against htmlspecialchars function?


  1. /quote 


ghost's Avatar
0 0

Oh, I figured out how to do it with strip_tags(). Thanks anyway.