[eluser]Unknown[/eluser]
I have a fairly simple controller that does a redirect but the problem is I am getting Internal Server Error instead of redirecting to the desired page. Can someone please help. Below is my controller code
I have also tried changing to absolute URL but no luck
redirect('http://localhost:8080/sites/pos/index.php/salesorder');
<?php
class Login extends CI_Controller {
public function Authenticate()
{
$config['hostname'] = "localhost";
$config['username'] = "root";
$config['password'] = "admin";
$config['database'] = "pos";
$config['dbdriver'] = "mysql";
$config['dbprefix'] = "";
$config['pconnect'] = FALSE;
$config['db_debug'] = TRUE;
if ($this->input->post("UserID"))
$userID = $this->input->post("UserID");
if ($this->input->post("Password"))
$password = $this->input->post("Password");
$this->load->model('UserModel','',$config);
$result = $this->UserModel->AuthenticateUser($userID,$password);
if (count($result) == 1)
{
redirect('index.php/salesorder');
}
else
{
echo "failure";
}
}
}
?>