I have a flask app. On the html file, I have a text input and a submit button, to POST the text input's value to flask, and add it to a database. Works pretty good.
But if I refresh the page, the app inserts the same row for a second time, because the POST method is still set as the text input's value. How do I remove the POST method after one execution?
if request.method == "POST":
caseNumber = request.form["caseNumber"]
myCursor.execute(
"INSERT INTO CASES VALUES ('{}', '', '', '', '')".format(caseNumber))
myConnection.commit()