Re: OO email-class



Siv Hansen wrote:
My code is like this: - from the email class
function checkInput($input){
        if(array_search('', $input)){
            $this->setError("All the fields must be filled out");
            return false;
        }
    return true;
}


This will only work when empty elements have an index > 0. What you will need to do is to use strict comparison:


if (false !== array_search('', $input)){
   ...
}


JW

.