Same page processing

后端 未结 6 694
我在风中等你
我在风中等你 2020-12-17 00:30

How can process a form on the same page vs using a separate process page. Right now for signups, comment submissions, etc I use a second page that verifies data and then su

6条回答
  •  既然无缘
    2020-12-17 01:24

    you can check if it was POST request inside the page's code and then check the data. If it was GET request - just show the form.

    But please remember that is is a good practice to show successfull form submission results on a different page served through GET request, i.e. any successfull form POST should be answered with redirect to the success page.

提交回复
热议问题