Başka bir PHP dosyası da dahil olmak

1 Cevap

How can I go from one *.php file to another *.php file? Örneğin, ben bu in'i varsa index.php:

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

ve bu second.php,

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

I include('index.php'); denedim, ama hiç çalışmıyor. Herhangi bir öneriniz?

1 Cevap

Eğer bir yönlendirme demek istiyorsun?

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