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

(09-22-2019, 10:44 AM)Wouter60 Wrote: You can't use variables surrounded by single quotes.
Try this:
PHP Code:
redirect('countries/'$country); 

You'll also need a route, otherwise CI thinks the $country is a function in the countries controller.
By default, the first segment in a url is the controller, the second segment is the function.

Thanks Wouter60, I changed your coding a little and without a route and everything appears to be working good now.

PHP Code:
redirect('/'$country); 
Reply


Messages In This Thread
RE: How to redirect using $this-session-userdata(country_territory) - by christaliise - 09-23-2019, 12:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB