话不多说直接上代码!!!!
from tkinter import *
import pymysql
from tkinter.messagebox import *
from tkinter import ttk
def get_connect():
conn = pymysql.connect(host=‘localhost’, user=“root”, passwd=‘GAO147258369’,database=‘stu’)
return conn
window = Tk()
window.geometry(‘500x300’)
window.title(‘登录账号!’)
def create():
root =Toplevel()
root.geometry(‘700x800’)
root.title(‘学生管理系统’)
Label(root, text=“学号:”).place(relx=0, rely=0.05, relwidth=0.1)
Label(root, text=“姓名:”).place(relx=0.5, rely=0.05, relwidth=0.1)
Label(root, text=“性别:”).place(relx=0, rely=0.1, relwidth=0.1)
Label(root, text=“电话:”).place(relx=0.5, rely=0.1, relwidth=0.1)
sid1 = StringVar()
name1 = StringVar()
sex1 = StringVar()
phone = StringVar()
Entry(root, textvariable=sid1).place(relx=0.1, rely=0.05, relwidth=0.37, height=25)
Entry(root, textvariable=name1).plac