nextpage.php - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of nextpage.php.php

  1. <?php
  2. //session_start();
  3.  
  4. if (empty($_SESSION['count'])) {
  5.    $_SESSION['count'] = 1;
  6. } else {
  7.    $_SESSION['count']++;
  8. }
  9.  $_SESSION['count']++;
  10. ?>
  11.  
  12. <p>
  13. Hello visitor, you have seen this page <?php echo $_SESSION['count']; ?> times.
  14. </p>
  15.  
  16. <p>
  17. To continue, <a href="nextpage.php?<?php echo htmlspecialchars(SID); ?>">click
  18. here</a>.
  19. </p>
  20.  
File Description
  • nextpage.php
  • PHP Code
  • 10 Feb-2020
  • 337 Bytes
You can Share it: