-
Notifications
You must be signed in to change notification settings - Fork 0
Data Sanitisation
Racktash edited this page Dec 21, 2012
·
4 revisions
PotatoSeed provides handy functions to allow for quick, easy data sanitisation.
psafe() - removes non-alphanumeric characters from a string
pemail() - removes characters (except alphanumeric, hyphens, dots and @ symbols) from a string
pdisplay() - pushes string through htmlentities() with ENT_QUOTES
punix() - converts string to lower case, replaces spaces with _ and removes non-alphanumeric characters
These functions are largely for convenience. The majority of them make straightforward use of existing PHP functions.