How to prevent adding data to a localhost database after refresh?
I fixed it with using header(“Refresh:0”); This allows the page to be refreshed immediately after the if statement has been processed, allowing the page to not resend the data that was inserted before.