This is my code, i have a form in HTML where an user can register then i try to save his registration data on mySQL DB, it says not all parameters are being used. Any solutions? The code is below
@app.route("/register", methods = ['GET', 'POST'])
def register():
##server = smtplib.SMTP("smtp.gmail.com",587)
if request.method == 'POST':
#Parse form data
password = request.form['password']
email = request.form['email']
firstName = request.form['firstName']
lastName = request.form['lastName']
conn = mysql.connector.connect(user='root', password='', host='localhost', database='mbvenditore')
cursor = conn.cursor(dictionary=True)
#query = ("INSERT INTO users (password, email, nome, cognome, indirizzo1, indirizzo2, cap, citta, provincia, stato, telefono) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s")
#cursor.execute("INSERT INTO utenti (idutente,password, email, nome, cognome) VALUES (NULL,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)")
#cursor.execute('INSERT INTO utenti VALUES (% s, % s, % s, % s)', (password, email, firstName,lastName, ))
cursor.execute('INSERT INTO utenti VALUES (%s , % s, % s, % s)', (password, email, firstName,lastName, ))
return render_template("login.html")