Replies are submitted to this page.
Form form
Here is the INSERT statement
$pdo =new PDO ("Mysql:host=localhost;dbname=t1", "Root", "");
$STNT = $pdo->prepare ("insert into reply (reid,name,content) VALUES (: reid,:name,:content)");
$stnt->execute ($_post);
Both of these codes are written on a page page with two questions when I submit the form, the contents of this input box can be inserted into the database and the form will be emptied but after I click on the Refresh page there is always a prompt box that is the content of the image below if I click Continue, the data that I have just submitted will be inserted again to the number According to the library and I changed other browsers to refresh the page is also prompted by this box Reply content:
Replies are submitted to this page.
Form form
Below is the INSERT statement
$pdo =new PDO ("Mysql:host=localhost;dbname=t1", " Root "," ");
$stnt = $pdo->prepare ("insert into reply (reid,name,content) VALUES (: reid,:name,:content)");
$stnt->execute ($_post);
Both of these codes are written on a page page. Two questions after I submit the form, the contents of this input box can be inserted into the database and the form will be emptied but after I click on the Refresh page there is always a prompt box which is the content of the following image if I click Continue, the data I have just submitted will be inserted again. Once again into the database and I'm changing other browsers to refresh the page also prompts this box
Post, it is best to 302 redirect to a new page
Design mode PRG: Post/redirect/get prevent duplicate submission of form