title: how to separate user/admin page?
body: <p>I want to separate user/admin login</p>
  
  <pre><code>          if ($user_id) 
            {
              //Create Session
              $user_data = array(
                    'user_id' =&gt; $user_id-&gt;id,
                    'username' =&gt; $username,
                    'email' =&gt; $user_id-&gt;email,
                    'name' =&gt;$name,
                    'login' =&gt; true
              );
  
              $this-&gt;session-&gt;set_userdata($user_data);
  
              if($user_data['username'] != 'Admin');
              {
                $this-&gt;session-&gt;set_flashdata('user_loggedin', 'You are now logged in.');
             redirect('users/dashboard');
              }
              if($user_data['username'] == 'Admin');
              {
              //Set Message
             $this-&gt;session-&gt;set_flashdata('user_loggedin', 'You are now logged in.');
             redirect('users/admin_dashboard');}
  
            }
            else
            {
              $this-&gt;session-&gt;set_flashdata('login_failed', 'Login is invalid.');
              redirect('users/login');
            }              
            }
  </code></pre>
  
  <p>it tells else condition error. please suggest
  any other way to solve this error. what mistake i have done.                                             </p>