Sanitize User Input Text with PHP
When you prompt user to input text (e.g. username, lastname etc), you may use Regular expressions to sanitize User Input, for example: allow space, any unicode letter if(preg_match("/[^40pL]/u", $term)) {…
When you prompt user to input text (e.g. username, lastname etc), you may use Regular expressions to sanitize User Input, for example: allow space, any unicode letter if(preg_match("/[^40pL]/u", $term)) {…
PHP is_numeric() is useful to find whether a variable is a number or a numeric string. How you can check if a variable is an integer? You may use the…