On Mon, 3 Mar 2003 14:00:43 -0500, you wrote:
>Maybe I'm off my rocker, but I don't see how this can't work. I'm trying to validate
>an ICQ number, and assuming a valid one is between 7 and 9 numbers. My line of code
>is this:
>
>if(ereg("^[0-9]{7,9}$", $_REQUEST["icqnumber"])) {
> print("a-okay!");
>} else {
> print("error msg");
>}
>
>I've submitted the ICQ # 2264532680, but it validates. Any ideas?
if (ereg ("^[0-9]{7,9}$", "2264532680")) {
print ("a-okay!");
} else {
print ("error msg");
}
fails. I suspect you're not grabbing the variable from the environment
correctly.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php