<?php  

$formUserName="foobar";

   if (ereg("^[a-bA-B][a-bA-B0-9]{3,11}$",$formUserName)
   {
   // IS VALID.
    $pageUserNameValid="YES";
   }
   else
   {
   // NOT VALID
    $pageUserNameValid="NO";
   }
 // PAGE OUT PUT..
  echo $pageUserNameValid;

?>

This simple script is ment to check to a user nae field but I have done something 
wrong.  

$pageUserNameValid This should be yes for foo bar.

// Phil

Reply via email to