Strip off tags from text.|
TAGS: strip, tags, PHP
For safety reasons you really should remove tags from the text that you users can input.
In PHP we have a nice little tool to strip off all HTML and PHP tags from any text. You can use it like in the example below, where the input from a textfield named 'form-subject' is read in a normal way with $_POST[''] and put in a variable named $subject. This is then parsed through the strip_tags and can then safely be written in to your database.
Or in short;
...will become this; 'Hello world'.