Welcome Guest, Not a member yet? Register   Sign In
(CLOSED) - Use of flashdata
#7

[eluser]gryzzly[/eluser]
Ok, thanks for advices. But for this project, i want/need to use core functionnalities when they exist, as most as possible.

At least, strange thing, i'll keep the following simple, and remove all my "complicated" view calls :

In my controller :
Code:
// Set a flash message
//$msg['result'] = "Item created.";
//$this->session->set_flashdata('flashmsg', $this->load->view('flashmsg/success', $msg));
$this->session->set_flashdata('flashmsg', '<p style="color:green;">Item created.</p>');

// Redirects to index
redirect('categories');

In my template file :
Code:
&lt;?php echo $this->session->flashdata('flashmsg'); ?&gt;

Finally, this works fine. It flashes even with redirection... and in the place i want to. I think i do not complety understand the flash functionnality behavior.

The problem seems then to come from the view call within the set_flashdata ... That blocks the flashdata() , and that destroys my page design (the flash outpouts before the doctype declaration).

I'm going to have a look, step by step.


Messages In This Thread
(CLOSED) - Use of flashdata - by El Forum - 03-19-2009, 03:35 PM
(CLOSED) - Use of flashdata - by El Forum - 03-19-2009, 03:44 PM
(CLOSED) - Use of flashdata - by El Forum - 03-19-2009, 04:05 PM
(CLOSED) - Use of flashdata - by El Forum - 03-19-2009, 04:13 PM
(CLOSED) - Use of flashdata - by El Forum - 03-19-2009, 05:13 PM
(CLOSED) - Use of flashdata - by El Forum - 03-19-2009, 05:21 PM
(CLOSED) - Use of flashdata - by El Forum - 03-19-2009, 06:09 PM
(CLOSED) - Use of flashdata - by El Forum - 03-19-2009, 06:49 PM
(CLOSED) - Use of flashdata - by El Forum - 03-19-2009, 07:08 PM
(CLOSED) - Use of flashdata - by El Forum - 03-19-2009, 07:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB