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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.