Advertisement
farikariyanto

login.php

Oct 22nd, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  2.  
  3. class Login extends CI_Controller {
  4.  
  5.   function __construct()
  6.   {
  7.     parent::__construct();
  8.   }
  9.  
  10.   function index()
  11.   {
  12.     if($this->session->userdata('logged_in'))
  13.         {
  14.             redirect('home', 'refresh');
  15.         }
  16.         else
  17.         {
  18.             $this->load->helper(array('form'));
  19.             $this->load->view('login_view');
  20.         }
  21.  
  22.   }
  23.  
  24. }
  25.  
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement