Welcome Guest, Not a member yet? Register   Sign In
alternartive to redirect('questions/index/' . $data['id'], 'location');
#1

[eluser]xpix[/eluser]
Hi all,

I am looking for an alternative to the following line of code

redirect('questions/index/' . $data['id'], 'location');

I do not want to use the "/index/" but I do want to add the ID in the URI

this line is used inside a controller like this

function add(){
if(something){
redirect('questions/index/' . $data['id'], 'location');
}else{
$this->load->view('add-survey',$data);
}

}
#2

[eluser]jnorris441[/eluser]
I would look at setting up your own routing rules. You could accomplish this using a wildcard route:

http://ellislab.com/codeigniter/user-gui...uting.html




Theme © iAndrew 2016 - Forum software by © MyBB