PDA

View Full Version : Prevent HTML.



Dentafrice,
03-07-2007, 07:55 PM
I want to strip the HTML out of a POST on my site.

Right now I have this:

$string = strip_tags(htmlspecialchars(addslashes(stripslashe s($value))));

But that just turns the < > to the HTML form if them.

Is there anyway I can completely remove the HTML?

Or detect if there is HTML in the post then to just exit and redirect to an error page?

Want to hide these adverts? Register an account for free!