这里是代码。我希望它按照以下方式运行--
表单提交 --> page2.php --> 重定向 --> page1.php(这里是消息。弹出或其他方式呈现)
page1.php
<form action="page2.php" method="post" enctype="multipart/form-data" class="form-inline subscribe-form">
<input type="name" name="name" placeholder="Jack">
</div>
<button type="submit" name="sub" value="sub" >Submit</button>
</form>
page2.php
<?php
//include necessary
if(isset($_POST['sub'])) {
$nameget = mysqli_real_escape_string($dbconnect, $_POST['name']);
$sqlentry = .....bla bla......//insert into DB
}
$getsql = mysqli_query($dbconnect, $);
if($getsql){
mysql_close($dbconnect);
header('location:page1.php');
}
?>