Welcome Guest, Not a member yet? Register   Sign In
$this->load->view() vs redirect()
#1

[eluser]Cheese[/eluser]
Does anyone know how these two calls/functions differ from one another? As far as I understand it they both perform the same action, only redirect() requires less typing.
#2

[eluser]Thorpe Obazee[/eluser]
They are NOT the same.

a redirect redirects you to a different URL.

$this->load->view() loads a view but you should still be in the same URL. This gives you the option to load different views in a method.
#3

[eluser]basty_dread[/eluser]
i used redirec() to take me to my homepage or wherever i want.
Code:
$this->load->view()
this will load a view plus data from your controller.




Theme © iAndrew 2016 - Forum software by © MyBB