Exemplo n.º 1
0
    def LogIn(event):
        flag=0

        connection = Database.DatabaseConnectionError();
        cursor = connection.cursor()
         
        t_password=ent_password.get()
        t_name=ent_name.get()
         
        sql_select_Query = "select * from users"
        cursor.execute(sql_select_Query)
        records=cursor.fetchall()
                
        for row in records:
            if row[1]==t_name and row[2]==t_password:
                flag=1
        if flag==1:
            root.destroy()
            MainLoop.MainEvent()
        l_r.set("Wrong Password or Username")