When I submit a form with PHP that updates a column in my database, it doesn’t display the updated data until after the page has been refreshed.
For example, say I want to delete the word watermelon from the following list:
apple, banana, watermelon, peach
I would have a submit button with a select form, where you select which word you want to delete (watermelon), and then press submit to delete it. The code will run a query to delete the word watermelon from the list, but when the page reloads, it is still there. You have to refresh the page to view the actual updated results.
Here is the code I’m using for my HTML form
<form action = '' method = 'POST'></form>
Place your database modifications before your output display in the PHP file. e,g,
show_fruits.php