[eluser]Nathan Payne[/eluser]
Hi,
I am new to this so please point out my obvious mistakes and tell me. Anyway, I am in the process of creating my first CI website and I have run into a problem creating my simple login script.
Code is below.
Controller:
Code:
<?php
class Admin extends Controller{
function Admin()
{
parent::Controller();
}
function index()
{
$this->load->model('admin_model', '', TRUE);
}
function verify()
{
if ($this->input->post('username')){
$username = $this->input->post('username');
$password = $this->imput->post('password');
$this->admin_model->authorize($username, $password);
if ($_SESSION['userid'] > 0){
redirect('admin/dashboard','refresh');
}
}else
{
$this->layout->view('login');
}
}
?>
I get the following error: Parse error: syntax error, unexpected ';', expecting T_FUNCTION in \system\application\controllers\admin.php on line 30