I am using the below code :
def static_info(nm):
cursor.execute("SELECT name,age,FROM MyDB where name like ?",(nm) + '%')
for row in cursor:
static={"NAME: ":row[0],"AGE: ":row[1]}
return(static)
@app.route('/submit_form')
def submit_form():
nm = request.form.get('name')
info=static_info(nm)
return render_template('static_display.html',info=info)
I need the desired function output (in the form of dictionary) on my static_display.html page
Any suggestions?