Re: I need some code help.
| From: | Mukul Sabharwal | Date: | Thu, 26 Oct 2000 04:04:51 +0000 |
| Subject: | Re: I need some code help. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-22036@lists.php.net to get a copy of this message | ||
> I only want it to contain A_Z a_z and 0_1 and
> underscore...
>
> How do I do this?
This allows you to do what you want to!
^ denotes it should start with the following and $ to
end with... hence from start to end
if (!eregi("^([a-z0-9_-])$", $username)) {
echo "invalid username";
exit;
}
Code Extracted From Authlib v1.2 (http://devhome.net)
=====
To Find Out More About Me : http://mukul.tsx.org/
__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf! It's FREE.
http://im.yahoo.com/