Guest User

Untitled

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