I am new to CodeIgniter. I am trying to read values from query string in conventional method not segment.
This is my url.
http://localhost/Voyager/Main/UserActivation/?u=6df497644a10241cd89fad80f5c98496
Controller:
class Main extends CI_Controller{
public function UserActivation()
{
$hash=$this->input->get('u', TRUE);
log_message('debug', $hash, false);
$this->load->view('Main\view_userActivation');
}
}
I am trying to read value of 'u' in controller. But this isn't working. I am getting empty value in $hash variable.
Any help is appreciated.
$config['allow_get_array'] = TRUE;at your config.php andmake sure yoururlhelper is loaded