'index.php', 2 => 'address.php', 3 => 'notification.php', 4 => 'gitterbox.php', 5 => 'obstart.php', 6 => 'gebrauchte.php', 7 => 'auftrag.php', 8 => 'frischsaft.php', 9 => 'summary.php'); $previous = null; $history_pos = 0; if (!isset($_SESSION['page_history'])) { $_SESSION['page_history'] = []; } if (isset($_REQUEST['history_pos']) && $_REQUEST['history_pos'] >= 0) { if ($_REQUEST['history_pos'] > 0) { $previous = $_SESSION['page_history'][$_REQUEST['history_pos']-1]; } $history_pos = $_REQUEST['history_pos']; // Das tötet einen eventuellen Forward-Button // Wenn man zurück gedrückt hat, ist array_pop($_SESSION['page_history']); } else { $previous = end($_SESSION['page_history']); $_SESSION['page_history'][] = $_SERVER['PHP_SELF']; // Index ist count()-1 $history_pos = count($_SESSION['page_history'])-1; } ?>