开发者

Including one PHP file in another

How can I go from one *.php file to another *.php file ? For example, if I have this in index.php:

<?php 
 <form method="POST" action="second.php">
 <input type="button" name="GO">
 </form>
?>

and this in second.php:

  <?php
    if ($_POST['GO'])
         // HERE SHOULD BE CODE LIKE "INCLUDE" OR SOMETHING TO GO TO index.php
  ?>

I have tried include('index.p开发者_StackOverflow社区hp');, but it doesn't work at all. Any suggestions?


Do you mean a redirect?

header('Location: index.php');
exit;
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜