@app.route('/login', methods=['post', 'get'])
def login():
if request.method == 'POST':
username = request.form.get('username')
password = request.form.get('password')
cursor.execute('INSERT INTO users (username, password) VALUES (?, ?)', (username, password,))
return render_template('login.html')
if request.method == 'POST':
username = request.form.get('username')
password = request.form.get('password')
cursor.execute('INSERT INTO users (username, password) VALUES (?, ?)', (username, password,))