Questions tagged [codeigniter-flashdata]

15 questions
2
votes
2 answers

Flashdata is not cleared after a redirect in CodeIgniter 3

I'm using CodeIgniter 3 and the flashdata I set on that project is not cleared even after a redirect. It still being shown after the page is refreshed or visit the page again. How can I fix this issue? A function in a controller. public function…
1
vote
1 answer

Why Flashdata value gets null on redirecting to another function in Codeigniter?

I am trying to get the input values from the view to controller and saving this value as flashdata to use it in the other controller. Now the i am able to store the value until i redirect, but as soon as it comes to redirect, it loses its value. I…
1
vote
2 answers

codeigniter, set_flashdata not working

I read on stack overflow about flash data only valid till next server request, therefore I made new flashdata for couple of message display.. here below is the my code This is my controller Controller public function login(){ …
user10100433
1
vote
2 answers

codeigniter : can't see my success message in other page

i have a problem : when click register in my form it is redirect me to the login page but they do not show me this message . "Thank you , you have been registered" this is a part of my login page "view"
0
votes
0 answers

Alert messages with php codeigniter 3

I am trying to display a success message every time someone login/logout/create post/delete post etc. At the beginning it didn't show on the screen and I changed a configuration in the session.php file that a lot of people suggested and the problem…
0
votes
0 answers

Uncaught Exception Encountered

Severity: 2 Message: Undefined property: Loader::$session Filename: C:\xampp\htdocs\try\app\views\users\login.php Line Number: 19 This is the view login.php enter image description here This is the view register.php enter image description here This…
0
votes
2 answers

Log in Validation alert pop up even though i'm not login yet

I try to make an alert for invalid login so I use $this->session->set_flashdata('error', 'Invalid Credentials'); redirect("admin/login"); and i put this in my index function $data=[]; if (isset($_SESSION['error'])) { …
0
votes
1 answer

flashdata being cleared after redirect

For some reason, the flashdata is cleared just before the view is loaded. As the log shows below. [04/02/2021 13:45:04] INFO: START: result $item {"userdata":{"__ci_last_regenerate":1612417338,"updateeventsuccess":"Event updated…
diggledoot
  • 691
  • 8
  • 22
0
votes
1 answer

route/redirect to index of same controller with data code igniter 4

I want to redirect route to index of same controller. My scenario is after store of data in database I want to show message. Now I tried using FlashData like: $this->session->setFlashdata('errmsg', json_encode(array('errstatus' => 'true' , 'msg' =>…
guradio
  • 15,524
  • 4
  • 36
  • 57
0
votes
1 answer

Why session flashdata message is being cleared in codeigniter?

First of all, I would like to share that I am calling api while unloading the page. So here what is happening. When I submit the form below things are happening. 1. from submit data is being sent to server and data is being saved to database. …
0
votes
1 answer

sending flashdata site locks up a couple of seconds

I have a codeigniter project I am working on. When a certain flashdata gets added the site locks up for no apparent reason. I write some data to my database or remove it. Then according to a success of fail I set some flashdata and redirect to the…
0
votes
0 answers

Code Igniter Flashdata not always keeping values after redirect

So this is a really weird one. I have recently discovered Code Ignitor's flash data, which is exactly what i need. However, I am noticing that sometimes I experience issues with it. Splitting it right down to the barebones(function one does…
Louis M.
  • 143
  • 13
0
votes
1 answer

Codeigniter how to stop page reloading looping ? when i use session set_flashdata ? it going looping

When I use CodeIgniter session set_flashdata and insert data in database page going looping infinity. but without use set_flashdata it working fine perfectly. $this->session->set_flashdata('success_msg', 'Successfully Inserted…
0
votes
1 answer

Cannot get the flashdata or userdata value to another function

I am trying to get the value of the flashdata and userdata from one function to another within the same controller. It seems that I am using redirect in the func A to func B. So when the func loads it does not read the value and becomes Null. I used…
0
votes
1 answer

CodeIgniter flashdata does not show the value from one Function to another after redirecting

I am trying to get the flashdata value from one function to another function within the same controller. As soon as I use redirect() it looses its value and shows empty. I tried using both flashdata and session data but nothing is working. Please…