I am creating a login page, so if login details are correct, I want the function to open up the app.route of the page the user is trying to login to. My code currently looks like this:
aUsername = request.form['username']
aPassword = request.form['password']
cursor.execute("SELECT password FROM tblLogin WHERE username =" + "'" + aUsername + "'")
correctPassword = cursor.fetchone()
if correctPassword == None:
return "username not found in system"
elif aPassword != correctPassword[0]:
return 'username and password do not match'
else:
but I dont know what should go after the else. Please help me out!