Redirect with data |
[eluser]Gerep[/eluser]
Is it possible to return $data on a Redirect? I need to reload my controller to get some information and also display a message. Thanks in advance.
[eluser]Cristian Gilè[/eluser]
You can use session flashdata. Read the session class guide: http://ellislab.com/codeigniter/user-gui...sions.html For example: Code: $this->session->set_flashdata('message', $msg_data); on the page target you can display the message with: Code: $this->session->flashdata('message');
[eluser]Atharva[/eluser]
you can fetch the data from the function to which you are redirecting Code: redirect('controller/func1/'.$id,'location'); Hope this helps.
[eluser]Gerep[/eluser]
Thanks guys, I solved the problem with session. Thanks a lot for your time and attention. |
Welcome Guest, Not a member yet? Register Sign In |