+ 2

Save user input even if app or webpage is refreshed/closed...

I was working on a code and I realised that I had no idea how to save an input from user after the webpage is refreshed or closed (for example the "username" or the points for a leaderboard...). What kind of methods or what kind of framework/library/language can be used to reach this???

11th Dec 2017, 9:01 PM
Ledio Deda
Ledio Deda - avatar
5 ответов
+ 3
Okay, it depends what you're saving Your user accounts, leaderboard scores, etc... (any data that we'll want to use later) should be stored inside of a database. This is more secure than storing it locally, and will help prevent users from manipulating data they shouldn't. However, if you want to have a "Remember Me?" feature that saves the username in the input field, then you can just store that information inside of a cookie. Cookies are stored on the local machine, so you don't want to have any sensitive information stored in a cookie. It's great for storing data to use later, and is why most websites remember a lot of your preferences.
11th Dec 2017, 9:29 PM
AgentSmith
+ 3
Well, the first option is what I was asking for. So I have to learn database... But as I said I don't have the slightest idea about how it works😅😕😕 Any advise, short description, example or rescourse??
11th Dec 2017, 9:33 PM
Ledio Deda
Ledio Deda - avatar
+ 3
I also am looking for some type of method of saving user data here in solo learn.
21st Dec 2017, 8:42 PM
Michael Simnitt
Michael Simnitt - avatar
+ 2
Sorry buddy, I had to leave work so I'm just seeing your reply. https://www.sololearn.com/Course/SQL/ ^Learn that. It's first step to dealing with most databases. From my experience, your knowledge of SQL usually translates to most languages that allow you to deal with databases (which is most).
12th Dec 2017, 1:42 PM
AgentSmith
+ 2
Sorry, too many questions but: How to link the SQL file with a web code????? Where to write one???😣😣😅
12th Dec 2017, 2:05 PM
Ledio Deda
Ledio Deda - avatar