+ 2
what do i change in this so that it does not display the iteration. only the print statement in the end of the if branches state
right now if i input the username and password it goes into the database and retrieves the data related to those variables and then checks whether they are true. However i get the following results code is on my profile called "effing login" Username: hello Password: hello12 "run the code" login unsuccessful login unsuccessful login unsuccessful login Successful >>> thanks UPDATE - more info in code explaining stuff. https://code.sololearn.com/c74jBk5J691c/#py
10 Answers
+ 3
Update:
https://code.sololearn.com/cHR963sRAVMX/?ref=app
A dictionary has keys and values, use the username as the key.
A database (MySQL would be better than a CSV). Also it's not good storing passwords as plaintext, however I understand this is just a demo for you to learn with?
As CSV doesn't work on here, I created a dummy login dictionary instead, to show it working.
There are other issues also.
+ 4
done it. it looks like an absolute beaut. i was thinking of hashing or adding some other encryption method (basic - like Caesar for fun) it but its gonna take too long for me to learn that and add it in by tom because i need to finish the rest of it. thanks a lot... (again).
+ 3
Put your code in the Code Playground on here.
+ 3
thank u very much. I'll implement that in my code. much appreciatedđ
+ 3
Yes, if it needs to be in tomorrow, then best to do lots of testing, rather than change anything too late and introduce errors âș
+ 3
yep
got to write a 100 page assignment on it due Sunday and finish the coding by tomđđŁđ„đđš (from the emojis, see how stressed I am)
+ 2
Xan sure will. I thought no ond was gonna look at it
+ 2
Xan there ya go. have at it
+ 2
@xan sorry wait wrong code uploaded.
0
Xan hey just a quick thing, would it be possible if u can take down the helping someone with the code. thank u very much for the help and it's appreciated but if somehow they find the code online they might say I've copied from here even tho that is my own. thanks