PHP Problem: else condition not executing
<pre><code>function procLogin( $user, $pass, $remember, $hostname, $domainame )
{ 
  global $session, $form;

  $retval = $session-&gt;login( $user, $pass, $remember );
  if ( $retval )
  {
    if ( $session-&gt;userlevel == 9 )
      if ( $session-&gt;isAdmin() ) 
        return ( array( 
          $session-&gt;userlevel, $session-&gt;userid 
        ) );
  } else { 
    $process = new process( );
    //process-&gt;s_Host('domain.com');
    //$process-&gt;s_Domain('domain.com');
    $process-&gt;s_Host( $hostname );
    $process-&gt;s_Domain( $domainname );
    $process-&gt;s_processSecure( false );

    $process-&gt;s_User( $user );
    $process-&gt;s_Pass( $pass );
    // First check we actually have a username and password set inside the process object.
    if ( $process-&gt;g_User() &amp;&amp; $process-&gt;g_Pass() )
    {
      if ( $process-&gt;processConn() )
      {
        if ( $process-&gt;processBind() )
        {
          return 'google';
        }
      }
    }
  }
}
</code></pre>

<p>My problem is if the login is false, why does it not turn towards else condition.... </p>

<p>if i remove the code inside else part and put return 'no' it does work.... i just want to know why the code inside the else part does not execute</p>
