Welcome Guest, Not a member yet? Register   Sign In
Flashdata??
#1

[eluser]mikeyhell[/eluser]
I'm calling a set_flashdata on a page. The sessions are automatically loaded and I've had no problems with them, but when I try to set this it returns the error:

Code:
$this->session->set_flashdata('error', "The username/password combination did not match.");

Error message:
Fatal error: Call to undefined method CI_Session:Confusedet_flashdata()

Any ideas?
#2

[eluser]ejangi[/eluser]
Hmmm... Not too sure... Just a couple of general questions to try a debug this:

- Are you running CI 1.6.x?
- Is this code inside a Controller method?
- You did load the session library right? (Based on the error this is a semi-redundant questions, but worth asking none-the-less).
#3

[eluser]mikeyhell[/eluser]
Yes, running CI 1.6.x
No, not in a controller
Yes, the session is loaded automatically. I have a session set in the same function which works just fine. I've had this error pop up before, but I just bypassed it w/ a regular session b/c I needed to get the app working.
#4

[eluser]ejangi[/eluser]
Post the entire function. If it's not in a controller, then where is it? You should be able to call $this->session unless you're in a controller...
#5

[eluser]mikeyhell[/eluser]
My bad, I had copied an older version of CI and thought I was using 1.6. Flashdata is working just fine now. Thanks for taking the time to help out.




Theme © iAndrew 2016 - Forum software by © MyBB