Don't worry about this I worked out that the example was wrong (o;

----- Original Message ----- 
From: "Newman Weekly." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 13, 2004 1:59 PM
Subject: [PHP] ereg problem


<?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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to