PHP Eregi.Php – String Function

<?php
   $pswd = "asdf1asdf";
   if (!eregi("^[a-zA-Z0-9]{8,10}$", $pswd))
   echo "password must consist of alphanumeric characters, and must be 8-10 characters in length!";
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.