Guest User

Untitled

a guest
Apr 19th, 2017
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. def Is_Valid():
  2. UsernameValidity=UserName_Entry.get()
  3. PasswordValidity=Password_Entry.get()
  4. cursor.execute('''SELECT password FROM users WHERE username = ?''', (UsernameValidity,))
  5. cursor.execute('''SELECT username FROM users WHERE password = ?''', (PasswordValidity,))
  6. LogInAttempt = cursor.fetchone()
  7. print (Is_Valid) # Testing to see if it works on shell
  8. if LogInAttempt:
  9. print (" One of the accounts have successfully logged in ")
  10. IsValidText.config(text=" You have logged in! ", fg="black", highlightthickness=1)
  11. myGUI.after(1000, CoreContent)
  12. else:
  13. print (" One of the accounts inputted the wrong credentials! ")
  14. IsValidText.config(text=" Invalid username or Password! ", fg="black", highlightthickness=1)
Add Comment
Please, Sign In to add comment