Same page processing

后端 未结 6 703
我在风中等你
我在风中等你 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:14

    The easiest construction is to detect whether the $_POST array is not empty

    if(isset($_POST['myVarInTheForm'])) {
      // Process the form
    }
    
    // do the regular job
    

提交回复
热议问题