Re: Help with form validation!
Posted: Tue Aug 04, 2009 8:12 am
In PHP everything coming from the user is a string, so it'll always return true if you check it with is_string(). That isn't a problem though, because PHP variables are loosely typed - PHP will treat the value as number if it's a number when you use a mathematical function on it. So, in your case, so long as is_numeric() returns true you're fine. You don't need to check if it's a string or not.