Welcome Guest, Not a member yet? Register   Sign In
redirect and function call from different controller is same or not?
#1

[eluser]ranjitbd[/eluser]
// controller travelmart.php
<?php
class Travelmart extends Controller {
function xyz()
{
some code here
}
?>

// controller miscellaneous.php

<?php
class Miscellaneous extends Controller {

function abc()
{
some code here
}

function aboutUs()
{
$this->abc();// call the function within the same controller

//$this->travelmart/xyz(); //cal function from different controller.its not working

//redirect('travelmart/xyz');
// it works but i want to make a call not redirect.bcoz i need some value from that function
//and come back to my aboutUs() function for some other functionality.
//so what to do?


$this->load->view('index', $data);
}
}
?>
#2

[eluser]Nicholas Bello[/eluser]
Read this Forum Post

It explains why not to do what you are trying. It also explains how to do it. Tongue

-Nick




Theme © iAndrew 2016 - Forum software by © MyBB