/ Published in: PHP
![](/img/icon_sav.png?v3)
This function uses the preg_replace counter to check for any non-alphanumeric characters.
You can use this for username / password validation if you don't want any special characters to be used.
You can use this for username / password validation if you don't want any special characters to be used.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php function validate_alphanum($string) { $count = 0; if($count != 0) { return false; } return true; } ?>
URL: http://robert.im
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)