Welcome Guest, Not a member yet? Register   Sign In
Strange behaviour using set_flashdata and redirect
#1

[eluser]CARP[/eluser]
I have a controller function called add
This function has a main if, that checks if something was posted from the view's form.

Code:
if ($this->input->post('field1'))
{
   ...load model and insert data
   $this->session->set_flashdata('msg', 'Data added!!');
   redirect('controller/add','refresh');
}
else
{
   ...Load models, helpers, etc.
   ...Load view with form
}

All goes fine, when I submit the form, data is added correctly, but the view doesn't load correctly. I mean, the models, helpers, etc. seem not to load when the else block code is called from redirect(...)

Hope you've understood me


Messages In This Thread
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 01:55 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 03:10 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 03:11 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 03:48 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 03:50 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 03:57 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 03:59 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 04:04 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 04:04 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 04:25 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-13-2010, 04:43 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-14-2010, 12:07 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-14-2010, 12:12 PM
Strange behaviour using set_flashdata and redirect - by El Forum - 04-14-2010, 01:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB