PHP: Alphanumeric validation checks if a string is alphanumeric. <?php function isAlphanumeric($str) { if (preg_match("/^([a-z0-9])+$/i", $str)) return true; return false; } ?> UsageInput $str, returns true if the string is alphanumeric, and false if it is not. Email ThisBlogThis!Share to XShare to Facebook
0 comments:
Post a Comment