Is there a correct way of using Flashdata? The doc seems confusing. |
Hi,
I'm confused with the documentation about flashdata. First the doc shows how to use flashdata http://codeigniter.com/userguide3/librar...#flashdata Then at Class Reference, all flashdata methods have this message "This is a legacy method kept only for backwards compatibility with older applications." So my question is, if using flashdata is a legacy, what is the current/best way of doing it? Thank you, Castle
Personally I'm using it like this.
PHP Code: // Helper function Setting PHP Code: $_SESSION['flashdata'] = 'Whatever'; Getting PHP Code: <?= get_flashdata('flashdata'); ?> (07-22-2020, 04:39 AM)jreklund Wrote: Personally I'm using it like this. Thank you. It's a nice approach. So, is the documentation outdated?
The code are still there in CodeIgniter 3, but as the documentation states that it's deprecated I choose to implement my own. Using $_SESSION as it stated instead. That code aren't using the Session Library.
|
Welcome Guest, Not a member yet? Register Sign In |