Code igniter routes making internal server error
Been stuck on this for hours, hope it is not something to simple.
So I'm trying to route 3 vars from one URL to another with this code:
$route['activate_email/(:any)/(:any)/(:any)'] = "user/activate/$1/$2/$3";
and the user controller code:
public function activate($code='', $email='', $id=''){
die("1");
//Check vars
if(empty($code) || empty($email) || empty($id) ||
!is_numeric(ceil($id))){
die("BAD");
}
//Check details in DB
$result = $this->db->query("SELECT * FROM `companies` WHERE `id` = ?",
array($id))->result_array();
print_r($result);
exit;
}
Thanks for any help
No comments:
Post a Comment