Created
December 31, 2012 18:19
-
-
Save jblac/4421802 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class user extends CI_Controller { | |
public function __construct() { | |
parent::__construct(); | |
} | |
function login() { | |
$data = ''; | |
if ($this->input->post('username')) { | |
$this->load->model('bm_users'); | |
$user = $this->bm_users->login($this->input->post()); | |
if ($user !== 'failed') { | |
$data['resp'] = '1'; | |
} else { | |
$data['resp'] = '0'; | |
$data['err'] = 'The username/password combination did not match. Please try again.'; | |
} | |
$dta = json_encode($data); | |
echo $dta; | |
} else { | |
$this->load->view('login'); | |
} | |
} | |
function login_check() { | |
vardump($_POST); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment