Guest User

Untitled

a guest
Nov 24th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <?php
  2. if(isset($_POST)){
  3. if(isset($_COOKIE["amin_contatore"])){
  4. $contatore = $_COOKIE["Amin_Count"] + 1;
  5. setcookie("Amin_Count", $contatore, time() + (60 * 60 * 24 * 7));
  6. }
  7. else{
  8. $contatore = 1;
  9. setcookie("Amin_Count", $contatore, time() + (60 * 60 * 24 * 7));
  10. }
  11. }
  12. ?>
  13.  
  14. <html>
  15. <head>
  16. </head>
  17. <body>
  18. <p>Ciao</p>
  19. <p>Sei entrato <?php echo $contatore." volte";?> in questa pagina</p>
  20. <form action="contatore.php" method="post">
  21. <input type="submit" name="submit" value="ricarica"/>
  22. </form>
  23. </body>
  24. </html>
Add Comment
Please, Sign In to add comment