Hello. I've a problem that could not solve yet...
In my app, there is 2 controller:
Main and
User.
In
Main controller, there is a method called
method1 that generate a random number, put it in $data['random'] variable, also store in session user data ($this->session->set_userdata('random', $data['random'])). Now $data['random'] loaded in a view, in a form input. After submitting the form to
User controller method, I retrieve random number that is sent via the form input, compare it with value in session. they are equal and no problem.
BUT, this scenario for
method2 (in
Main controller) that has a parameter, is failed!!! I mean, I have
method2 in controller that passed a parameter to it, and like
method1 generate random number and... but when I retrieve data that is sent and data in session, they are not equal!!!
Another thing, when I store a fixed number in $data['random'] (and as scenario is said, $this->session->set_userdata('random', $data['random'])), result of both method is good; data that is sent via form and data retrieve from session is equal.
I could not guess where is the problem, just a passed parameter is the difference between methods but...!
thanks.