Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- $page = 0;
- $last_page = 0;
- if(isset($_GET['page'])) $page = intval($_GET['page']);
- if(isset($_SESSION['last_page'])) $last_page = $_SESSION['last_page'];
- $_SESSION['last_page'] = $page;
- if($page == 0) {
- // Prima data aici, e ok...
- }
- elseif($page == 1) {
- if($last_page != 0){
- echo 'Gresit! <a href="test.php">La inceput</a>';
- die();
- }
- }
- elseif($page == 2) {
- if($last_page != 1){
- echo 'Gresit! <a href="test.php">La inceput</a>';
- die();
- }
- }
- elseif($page == 3) {
- if($last_page != 2){
- echo 'Gresit! <a href="test.php">La inceput</a>';
- die();
- }
- else {
- echo 'Bravo! Perfect! <a href="test.php">La inceput</a>';
- die();
- }
- }
- ?>
- <a href="test.php?page=1">Buton1</a><br>
- <a href="test.php?page=2">Buton2</a><br>
- <a href="test.php?page=3">Buton3</a><br>
Add Comment
Please, Sign In to add comment