Welcome Guest, Not a member yet? Register   Sign In
How to change path?
#1

[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?
#2

[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.
#3

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

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

just added helper and it works.




Theme © iAndrew 2016 - Forum software by © MyBB