Re: [PHP] How do I validate input using php?

2002-07-24 Thread JSheble
you're returning a literal true if the condition matches, and nothing if it fails... function validate() { // if ( is_numeric($input1) && is_numeric($input2) && ctype_alpha($input3) && ctype_alpha($input4) ) return true; else return f

[PHP] How do I validate input using php?

2002-07-24 Thread Øystein Håland
I've tried a function like this: function validate() { // if ( is_numeric($input1) && is_numeric($input2) && ctype_alpha($input3) && ctype_alpha($input4) ) return true; } And then I call the function: if (validate() == false) { some action; } My problem is I get the action every time, eve