0

I'm developing a login page in which i have a three fields and a checkbox.

Three fields are:

a code
an username
a password

I want to let user clicking on checkbox to remember (even if close browser) the code and login but not the password. Can you help me? I hope to choose right question :)

2 Answers 2

3

That's simple, Use browser cookies to store the same. So that next time the user logs in you can pick the value from the cookie in his browser .

IMPORTANT : BUT Here's how you make it secure. Since you are storing the UserID etc. I would recommend encrypting and storing it, next time you can pic the value decrypt and then show back

OR

Just set a flag in cookie on click of checkbox (to remember) and populate the User ID and code from the server code if that flag is true the next time you see from cookie.

EDIT : Since you have not mentioned what language/tech you are developing this, just use server side api's to read the cookie values or jQuery/script

Sign up to request clarification or add additional context in comments.

3 Comments

well my edit must answer your question :) .. if you are using Javascript as tagged in question this link will help hope this helps
this document.cookie=c_name + "=" + c_value; is like querystring? to save multiple value can i use &?
@user1190704: was away for some time, regret not getting back earlier. I fail to understand your problem, what are you trying to do ? you seem to be not researching in the right direction as suggested above
0

Have you never read about cookies?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.