(11-17-2015, 12:21 PM)Martin7483 Wrote: Have you tried
After setting it?
PHP Code:
$this->session->set_flashdata('message', 'test');
var_dump($_SESSION);
exit;
redirect('login', 'refresh');
Is the message available in the $_SESSION array?
I checked this and yes, the message is available in the $_SESSION array:
Code:
array (size=3)
'__ci_last_regenerate' => int 1447806257
'message' => string 'Update successful.' (length=18)
'__ci_vars' =>
array (size=1)
'message' => string 'new' (length=3)
This was the dump before the redirect.
(11-17-2015, 01:36 PM)ivantcholakov Wrote: Is there an AJAX request? Maybe it somehow captures and clears the flashdata before the redirection?
A side note:
When AJAX is called by jQuery
headers["X-Requested-With"] = "XMLHttpRequest";
is done automatically, but in other cases this header might be forgotten.
No, there is no AJAX request. It is a normal form submission (POST request).