[eluser]luukskywalker[/eluser]
Hello everybody,
I have succesfully build an application with Codeigniter.
Big thank you to the developers because this framework is really really good.
But i have a small problem.
i want to create a mobile version of my application(small version with only a little bit of functionality).
But i want to make it as secure as possible.
I tried opening my current application on a mobile device but i can't seem to log in.
This is what i did:
- User types in username and password.
- System checks in the database if user exists and if the password matches the password field.
-If so:
Code:
$sessiondata = array(
'userid' => $userid,
'name' => $name,
'email' => $email,
'logged_in' => true);
$this->session->set_userdata($sessiedata);
etc.(i use the userid and email a lot during my application.)
-During the application the system checks when calling a function if logged in = true like this:
Code:
$login = $this->session->userdata('logged_in');
if($login==true){
//Do stuff
}else{
//Send back to login screen and give error message: "Not logged in"
}
Plain and simple.
But if i login on a mobile system, after pressing the submit button, i get the error message not logged in.
Can someone tell me what my problem is?
I hope its clear explained this way.
Thanks in advance!
Luukskywalker