• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
set_flashdata is underfined?

#1
PHP Code:
        $session = \Config\Services::session();
        
$session->set_flashdata('error''Wrong email or password. Have you forgotten your password?'); 

the error feedback is as follows:
PHP Code:
Call to undefined method CodeIgniter\Session\Session::set_flashdata() 
Q&A for Codeigniter
StartBBS--open-source, light weight forum software.
Best VPS:Digital Ocean
Reply

#2
https://bcit-ci.github.io/CodeIgniter4/l...#flashdata

You are just using the version 3 names, version 4 has diffrent names Smile
Reply

#3
Code:
        $session = \Config\Services::session();
        $session->setFlashdata('error', 'Wrong email or password. Have you forgotten your password?');
Reply

#4
Thanks guys!!
Q&A for Codeigniter
StartBBS--open-source, light weight forum software.
Best VPS:Digital Ocean
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.