Session data lost after route redirect |
12-20-2024, 08:34 AM
(This post was last modified: 12-20-2024, 12:46 PM by lelolenda. Edit Reason: forgot something )
PHP: 8.3.14 — CodeIgniter: 4.5.1
PHP Code: <?php Cookies Set. PHP Code: <?php my login authentication does not work because after storing the data in the session and redirecting to another page I simply lose the logged in user data works on another server and local server. tried patch System/Session/Session.php and add session_start() at public_html/index.php Flashdata dont work either.
12-20-2024, 11:04 AM
(This post was last modified: 12-20-2024, 11:09 AM by captain-sensible. Edit Reason: forgot something )
the only session stuff i care or bother with is when admin gui is accessed and admin logs in, or somebody attempts to log in . I have a few methods in a class and several views. I just put this line at the top of every method in the class
Code: $session = \Config\Services::session(); eg Code: public function displaySession() Code: public function logout() (12-20-2024, 11:04 AM)captain-sensible Wrote: the only session stuff i care or bother with is when admin gui is accessed and admin logs in, or somebody attempts to log in . I have a few methods in a class and several views. I just put this line at the top of every method in the class thank you |
Welcome Guest, Not a member yet? Register Sign In |