我点击保存按钮时将我的页面重定向到save.php,当我点击下一步按钮时,我将页面重定向到next.php.
<form name="crtext" method="post" action="o_crt_ext.php" enctype="multipart/form-data">
<input type="submit" name="save" value="save" />
<input type="submit" name="next" value="next" />
</form>
Run Code Online (Sandbox Code Playgroud)
o_crt_ext.php
<?php
if(isset($_POST['save']));
{
header("location:save.php");
}
if(isset($_POST['next']));
{
header("location:next.php");
}
?>
Run Code Online (Sandbox Code Playgroud)
删除if语句中的分号
o_crt_ext.php
<?php
if(isset($_POST['save']))
{
header("location:save.php");
}
if(isset($_POST['next']))
{
header("location:next.php");
}
?>
Run Code Online (Sandbox Code Playgroud)