I'm unable to fetch information from my html form to my python code. I checked the code many times but there doesn't seem to be a problem. Please check my code and tell me what's wrong. Thank you.
@app.route("/search",methods=["POST","GET"])
def search1(): #python code
var=request.form.get("search2")
sear=str(var)
print(var,sear)
return " "
<html> <!--html code-->
<head>
<title>hi there</title>
</head>
<body>
<h1 style="font-family:verdana; font-style:italic;">Welcome to the book sea !!!....</h1>
<form action="{{ url_for('search1') }}" method="get" align:"center">
<input type="text" name="search2" placeholder="enter details">
<button>search</button>
</form>
</body>
" "maybe you meant to use""" <html>... """. Does the above even run? Can you share logs?app.route(....)is a decorator, So use@app.route(....).