This class automatically sanitizes your data in various ways. Current options include “strict”, “html”, “mysql”, “both” (html and mysql), or “none”.
Each sanitizing level handles data a little bit differently. “strict” will return input with only alphanumeric characters. “html” encodes all html-entites. “mysql” escapes all special mysql characters (no mysql connection required). “both” runs the html sanitizing and then the mysql. “none” will give you the data as it is.
Optional maxlength parameters included! Before you sanitize a string, you can define the max length (for strings) or max value (for numbers). Strings will be cut off at the maxlength before it is sanitized, and numbers won’t be allowed past that value.