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

Move this line from controller to view:
PHP Code:
$user_id $this->session->userdata('user_id'); 

Or put the $user_id in an array which is passed to the view.
Controller:
PHP Code:
$data['user_id'] =  $this->session->userdata('user_id'); 
$this->load->view('createadvert'$data); 

In both cases, the $user_id variable will be available in the view.
Reply


Messages In This Thread
RE: How to redirect using $this-session-userdata(country_territory) - by Wouter60 - 09-28-2019, 10:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB