def userInfo(): if request.method == 'POST': user = User() user.name = request.form.get("name") session['name'] = user.name; user.pwd = request.form.get("password") result = database.checkUser(user.name, user.pwd) if result: user.pNumber = result[0][3] user.age = result[0][2] user.sex = "male" if not result[0][5]: user.sex = "femail" return render_template("userInformation.html", user=user) return redirect(url_for('login'))