In order to make things right and prevent CodeIgniter from loading another views after a loaded view I needed to added die()
at the end of views (footer). Is this a bad practice and Will this cause any problems?
The code is a little bit large to be posted here but I can say that there is an if statement which loads a view and by default the function loads another view. So when if statement gets passed, It loads the defined view and then the function loads the default view after it. I can use die() inside my controller but it gives me a blank page meaning that die() got executed before loading the view. and I can't neither use redirect().