Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Aug 2nd, 2010 | Syntax: PHP | Size: 0.51 KB | Hits: 189 | Expires: Never
Copy text to clipboard
  1. <?php
  2. //action.php
  3.  
  4. $time = time();
  5. $current = date("Y-m-d H:i:s",$time);
  6. print sprintf("Time is %s<p>",$current);
  7.  
  8. $event = $_POST['event'];
  9. print "$event<p>";
  10.  
  11. define('FORUM_ROOT', '/var/www/nginx-default/punbb/');
  12. require FORUM_ROOT.'include/common.php';
  13.  
  14. print $forum_user['username'] . "<p>";
  15.  
  16. /*
  17. //cookie -> $_SESSION['username'];
  18. //Does $_SESSION contain 'username'?
  19. //Nothing printed on screen
  20. foreach ($_SESSION as $key => $value){
  21.   print sprintf("%s = %s<p>\n",$key,$value);
  22. }
  23. */
  24.  
  25. ?>