Welcome Guest, Not a member yet? Register   Sign In
User Login Page?
#4

[eluser]Developer13[/eluser]
Your controller:

class login extends Controller {

function login() {

parent::Controller();

}

function index() {

$rules = array('username'=>'required','password'=>'required');
$this->validation->set_rules($rules);

$fields = array('username'=>'Username','password'=>'Password');
$this->validation->set_fields($fields);

if ($this->validation->run()) {

// the form has been submitted and has validated - let's process

// check to see if username and password authenticates against database

// if it does, redirect to where they need to be

// if not, redirect to login form again

}

else {

// the form has *not* been submitted and / or has not validated - let's display the form

$this->load->view('form');

}

}

}


Messages In This Thread
User Login Page? - by El Forum - 07-28-2008, 09:01 AM
User Login Page? - by El Forum - 07-28-2008, 09:52 AM
User Login Page? - by El Forum - 07-28-2008, 11:38 AM
User Login Page? - by El Forum - 07-28-2008, 01:11 PM
User Login Page? - by El Forum - 07-28-2008, 08:23 PM
User Login Page? - by El Forum - 07-28-2008, 09:41 PM
User Login Page? - by El Forum - 07-28-2008, 11:34 PM
User Login Page? - by El Forum - 07-28-2008, 11:53 PM
User Login Page? - by El Forum - 07-29-2008, 09:59 AM
User Login Page? - by El Forum - 07-29-2008, 10:59 AM
User Login Page? - by El Forum - 07-29-2008, 11:24 AM
User Login Page? - by El Forum - 07-29-2008, 09:59 PM
User Login Page? - by El Forum - 07-30-2008, 01:35 AM
User Login Page? - by El Forum - 07-30-2008, 04:25 AM
User Login Page? - by El Forum - 07-30-2008, 05:42 AM
User Login Page? - by El Forum - 07-30-2008, 10:00 PM
User Login Page? - by El Forum - 09-24-2008, 09:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB