There are so many td elements with a tag and I want to know that user clicked which element and I want to pass from HTML to the backend and process with the user's selection on the backend.
This is my HTML content:
<a href="/selected" ????><td>{{ options1 }}</td></a>
<a href="/selected"><td>{{ options2 }}</td></a>
<a href="/selected"><td>{{ options3 }}</td></a>
<a href="/selected"><td>{{ options4 }}</td></a>
<a href="/selected"><td>{{ options5 }}</td></a>
<a href="/selected"><td>{{ options6 }}</td></a>
When a user clicked one, I want to send it to the backend:
@app.route('/selected', methods=['GET', 'POST'])
def selected():
selected_option = request.args.get('????')
return render_template("selected.html", selected_option=selected_option)
How can I fill the question marks?