I have problem in this code. In this code when i press save data button , the data insert into database but when i refresh page then it\'s automatically insert into database, wh
Make a separate php file that will insert data to database. Give this in the form action attribute.
insert.php file
You can use header()
to redirect to your previous page if you want. Thus not allowing the refreshing of insert.php
header("location: your_page.php");
it will be safe if you use Prepared Statements Take a look