[eluser]xeroblast[/eluser]
i finally solved this problem. the problem was my implementation of the code.
Code:
$this->session->set_userdata('browser','< script >document . write (navigator.appName);</ script >');
is not the proper way to compare string coz the session reads the whole string as the script. that is why it has 51 characters. so i change the implementation to a different style.
Code:
function index() {
echo '< script >window . location = "'.site_url('controller_name/browser').'/"+navigator.appName;</ script >';
}
function browser($browser) {
if ($this->session->userdata('browser')) {
$this->session->set_userdata('browser',$browser);
}
redirect('controller_name/function_name');
}