Ask coding questions

← Back to all posts
Login detail saving
Muhammad_SJC

Let's say I have a code. What I want to do is people to either login or sign up. If someone logs in, their login details will be forgotten by the code after the person has exited. I want my code to be able to remember login details even if someone exits it. The language I code in: Python. Please help!!!

Answered by a5rocks [earned 5 cycles]
View Answer
Voters
KSDGAMER
tcarmickle24
Muhammad_SJC
Comments
hotnewtop
a5rocks

Two options:

a) Using a file (only you can save)
b) Using a database online (people might delete other people's entries)

Though, you can make a web repl that accepts a certain input, and adds to your db. You could then use .env. I'm probably not making sense, but ask me any questions you have about what I wrote.

Muhammad_SJC

@a5rocks I don't get anything. Can you please give an example?

a5rocks

@Muhammad_SJC

a)

if you want to store username and password. Also, if you plan on making this more complex I recommend storing as json

b)

c)
Basically a server that implements b) so you don't give away your db credentials. Then it's just

I recommend joining the discord so you can ask people who actually know databases.

Muhammad_SJC

@a5rocks thank you