I want to delete a specific row in my database but I don't know how to do it. On my HTML I have this:
<div class="cases">
{% for row in rows %}
<div class="card border-success mb-3" style="max-width: 18rem;">
<div class="card-header">{{ row['title'] }}</div>
<div class="card-body">
<p class="card-text">{{ row['text'] }}</p>
<p id="whatsapp"> <img src="./static/whats.png" alt="whatsapp" height="15px" > {{ row['whatsapp'] }}</p>
<a href="./delete"> Delete Case</a>
</div>
</div>
{% endfor %}
</div>
and on Application.py this:
@app.route("/delete")
def delete():
id = db.execute("select id from cases")
db.execute("delete from cases where id = :id ", id = id)
return redirect ('/ngoshome')
How do I delete this specific id of Cases ?
<form>
or an ajax call.