开发者

Redirect PHP page

I want to redirect my page to save.php when i click save button and redirect my page to next.php when I click next button.

<form name="crtext" metho开发者_如何学JAVAd="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>

o_crt_ext.php

<?php
if(isset($_POST['save']));
{
header("location:save.php");
}
if(isset($_POST['next']));
{
header("location:next.php");
}
?>


remove the semicolons on the if statements

o_crt_ext.php

<?php
if(isset($_POST['save']))
{
  header("location:save.php");
}
if(isset($_POST['next']))
{
  header("location:next.php");
}
?>


Do you want to send any information if the user click on the Next-button? Of not: here you go.

 <form name="crtext" method="post" action="o_crt_ext.php" enctype="multipart/form-data">

 <input type="submit" name="save" value="save" />
 <input type="button" onclick="window.location.href='next.php'" value="next" />
 </form>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜