What happens when I refresh the page always?

Source: Internet
Author: User

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

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.