CodeIgniter Forums
How to change path? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: How to change path? (/showthread.php?tid=29794)



How to change path? - El Forum - 04-21-2010

[eluser]Unknown[/eluser]
Hi!
I have such code:
Code:
<?php
class Page extends Controller {

function step1() {
...
$this->step2();
...
}

function step2() {
$this->load->view('step2');
...
}

}

when i point browser to http://site.com/index.php/page/step1/
template changing, but url don't change to http://site.com/index.php/page/step2/
how to change url?


How to change path? - El Forum - 04-21-2010

[eluser]Zeeshan Rasool[/eluser]
Basically you are not redirecting from one function to other, here you are calling a method's functionality in your code. Its like Ajax way, no url change but content can be changed.


How to change path? - El Forum - 04-21-2010

[eluser]danmontgomery[/eluser]
Code:
redirect('page/step2');



How to change path? - El Forum - 04-21-2010

[eluser]Unknown[/eluser]
I try and app writes:
Call to undefined function redirect()
What wrong?

just added helper and it works.