How is it possible to check the entries for login and password and if they are correct, new tabs will open. If the entries are incorrect, an error message will be displayed. The user should also be able to register for an account
from tkinter import *
import sqlite3
import tkinter
import time
root = Tk()
root.title("Sale System")
root.geometry("500x500")
root.configure(background='grey')
Label(root, text="Checkout System", background='grey').grid(row=0, column=1)
Label(root, text="Time:", background='grey').grid(row=1, column=1)
def clock():
t=time.strftime('%I:%M:%S',time.localtime())
if t!='':
labeltime.config(text=t)
root.after(100,clock)
labeltime=Label(root, text="Current System Time", background='grey')
labeltime.grid(row=1, column=1)
time1 = clock()
def new_winF(): #Opens registration confirmation window
newwin = Toplevel(root)
display = Label(newwin, text="Your account has been created. Please log in with your new details. This window may be closed.")
display.pack()
Label(root, text="Username:", background='grey').grid(row=3, column=0, sticky=W)
Label(root, text="Password:", background='grey').grid(row=4, column=0, sticky=W)
e1 = Entry(root)
e1.grid(row=3, column=1)
if e1 == 'yes':
command =new_winF
e2 = Entry(root)
e2.grid(row=4, column=1)
LoginButton = Button(root, text="Login", width=10)
LoginButton.grid(row=5, column=1)
RegisterButton = Button(root, text ="Register", command =new_winF, width=10)
RegisterButton.grid(row=6, column=1)
root.mainloop()