Submit form |
[eluser]szulcseban[/eluser]
i have a form on example form_open('menu_backend/submit_form'), and now in submit_form() i want to go to index() from controller menu_backend and send info "changes saved". Sorry for my poor english.
[eluser]dbashyal[/eluser]
Quote:i have a form on example form_open(’menu_backend/submit_form’), and now in submit_form() i want to go to index() from controller menu_backend and send info “changes saved”. does this work? give a try. NOT TESTED Code: function index($msg = '') {
[eluser]Popcorn[/eluser]
I think you will want something like flashdata notifications. http://michaelwales.com/projects/flashda...fications/
[eluser]Chris Newton[/eluser]
Flashdata is a method of sending info from page to page upon redirect. http://ellislab.com/codeigniter/user-gui...sions.html Using CI's session library: CodeIgniter supports "flashdata", or session data that will only be available for the next server request, and are then automatically cleared. These can be very useful, and are typically used for informational or status messages (for example: "record 2 deleted"). Note: Flash variables are prefaced with "flash_" so avoid this prefix in your own session names. To add flashdata: $this->session->set_flashdata('item', 'value'); You can also pass an array to set_flashdata(), in the same manner as set_userdata(). To read a flashdata variable: $this->session->flashdata('item'); |
Welcome Guest, Not a member yet? Register Sign In |