Not quite: you'll only be checking if $password contains a single letter or number.
<?
if (eregi ("[:alphanum:]+$", $password))
{echo "password ok";}
else {echo "password not ok";}
?>
I can't remember - is [:alphanum:] a recognised ereg class?
<?
if (preg_match("/[a-z0-9]+$/i", $password))
{echo "password ok";}
else {echo "password not ok";}
?>
"If at first you don't succeed - delegate the job to someone else and blame them"