Frederick Marcoux
Frederick Marcoux

Reputation: 2223

How to block HTML code in form?

How I can block HTML codes in my form? So, when someone enter a HTML code, it's not usable...

It's for a comments system...

Upvotes: 0

Views: 180

Answers (3)

You would want to use HTMLEntities. It will escape all special entities like <>.

Upvotes: 1

Daniel A. White
Daniel A. White

Reputation: 190897

You could just use strip_tags.

Upvotes: 1

Joeri
Joeri

Reputation: 361

http://www.php.net/manual/en/function.htmlspecialchars.php

htmlspecialchars()

Upvotes: 5

Related Questions