setEmail($email); $empresa->setPassword($password); $empresa->setEmpresaId("15"); // Check for validation errors set by setEmail, setPassword, setEmpresaId if($empresa->Util()->GetError()) { $empresa->Util()->PrintErrors(); echo 'fail[#]'; exit; } if(!$empresa->DoLogin()) { // If DoLogin itself sets errors (e.g., incorrect credentials), print them here if($empresa->Util()->GetError()){ $empresa->Util()->PrintErrors(); } echo 'fail[#]'; } else { echo 'ok[#]ok'; } ?>