Welcome Guest, Not a member yet? Register   Sign In
How to redirect using $this-session-userdata(country_territory)
#1

This is the coding in the Login Controller.

PHP Code:
$data = array('user_id' => $result->user_id,
'user_name' => $result->user_name,
'first_name' => $result->first_name,
'last_name' => $result->last_name,
'country_territory' => $result->country_territory); 

And this is the coding in the Controller that I've tried but PHP wont accept the variable in redirect.

PHP Code:
$country $this->session->userdata('country_territory');
redirect('countries/$country'); 

I want to redirect to the country that exists in the database rather than IP address.

Can anybody guide me?
Reply


Messages In This Thread
How to redirect using $this-session-userdata(country_territory) - by christaliise - 09-22-2019, 06:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB