RE: I lied, another question / problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

> -----Original Message-----
> From: Roman Neuhauser [mailto:neuhauser@xxxxxxxxxx] 
> Sent: January 15, 2007 7:09 PM
> To: Beauford
> Cc: PHP
> Subject: Re:  I lied, another question / problem
> 
> # phpuser@xxxxxxxxxx / 2007-01-15 16:31:32 -0500:
> > I have file which I use for validating which includes the following
> > function:
> > 
> > function invalidchar($strvalue)
> > {
> > 	if(!ereg("^[[:alpha:][:space:]\'-.]*$", $strvalue)) {
> 
> That regexp matches if $strvalue consists of zero or more 
> ocurrences of a letter, a whitespace character, and any 
> character whose numeric value lies between the numeric values 
> of "'" and "." in your locale.
> Zero or more means it also matches an empty string.
> 
> 
> --
> How many Vietnam vets does it take to screw in a light bulb?
> You don't know, man.  You don't KNOW.
> Cause you weren't THERE.             http://bash.org/?255991
> 
> --
> PHP General Mailing List (http://www.php.net/) To 
> unsubscribe, visit: http://www.php.net/unsub.php

Further to my previous email, there is something weird going on here. I just
tried using this:

	if (!ereg('^[A-Za-z0-9]', $strvalue)) {
		 return "error";
	}

When I enter the word Test, which is valid, I am still getting an error
returned - but only on this one page. So there has got to be something on
this page that is screwing this up, but what. I have been over and over this
and can't see a problem.

I could really use another pair of eyes on this as it is driving me nuts. I
am now into hour 6 with this. Absolutely ridiculous.

Thanks




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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux