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;
精彩评论