Guest User

Untitled

a guest
Apr 10th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. @app.route("/checkUser",methods=["POST"])
  2. def check():
  3. username = str(request.form["username"])
  4. password = str(request.form["password"])
  5. cursor = conn.cursor()
  6. cursor.execute("SELECT uname FROM user_details WHERE email='" + username + "' AND password = '"+password+"')")
  7. user = cursor.fetchone()
  8.  
  9. while user is not None:
  10. return render_template("chat.html")
  11.  
  12. else:
  13. return "failed"
Add Comment
Please, Sign In to add comment