Assume that I have login to system using PHP + MySQL, then, after I exit the apps, I run the apps again, no need to login again and auto login, Please help to solve the problem.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
while first time login u get something username or userid in respones than store ther username or userid in sharedpreference like as shown below
as after succesfull login this will store your userid in preference and u can check u are already login or not as
after check
this is just simple way for doing what u want suppose if u want logoout functionality on button click than onclick event u have to add following code for logout which will clear prefernce