Page 1 of 1

Re: Help with form validation!

Posted: Tue Aug 04, 2009 8:12 am
by onion2k
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.

Re: Help with form validation!

Posted: Thu Aug 06, 2009 12:17 pm
by jackpf
You should use isset() to make sure the post variables exists before checking if they're null.