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

[eluser]gryzzly[/eluser]
Code correction :
Code:
// Set a flash message
$msg['result'] = "Item created.";
$this->session->set_flashdata('flashmsg', $this->load->view('flashmsg/success', $msg));

// Redirects to add (current action)
// redirect('categories/add');
If i DO NOT redirect, it flashes ...
Code:
<?php echo $this->session->flashdata('flashmsg'); ?>

Code:
<p class="flashmsg success">&lt;?php echo $result; ?&gt;</p>

But :
Code:
// Set a flash message
$msg['result'] = "Item created.";
$this->session->set_flashdata('flashmsg', $this->load->view('flashmsg/success', $msg));

// Redirects to add (current action)
redirect('categories/add');
Now, i'm pretty sure that the thing.
No flash ... Flashdata is destroyed when redirecting.

Can anyone confirm this idea ?
If i'm right, what the way to go ?

EDIT : tryed keep_flashdata() without success ... something wrong with me ? :-s


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