Hey guys I'm trying to compare user input with what's in the database to see if they can login or not.
I'm getting a list back from the input and it's adding paranthesis and commas and apostrophes to each value so it's not matching up when compared.
How can I get rid of these extra special characters?
Thanks
I'm getting a list back from the input and it's adding paranthesis and commas and apostrophes to each value so it's not matching up when compared.
How can I get rid of these extra special characters?
Thanks
@app.route("/login", methods=["GET","POST"]) def login(): password = request.form.get("password") username = request.form.get("username") usernamedata = db.execute("SELECT username FROM users WHERE username=:username", {"username":username}).fetchone() passworddata = db.execute("SELECT password FROM users WHERE username=:username", {"username":username}).fetchone() print(usernamedata) print(passworddata) print(username) print(password) if username == usernamedata and password == passworddata: return render_template("login.html") else: return render_template("login.html")