[phplib] Cookies!!! From: Vivek Kumar Agrawal (vivek.agrawal <email protected>)
Date: 05/01/01

Hi

I am using following code for the index.php3 file and I got this code from PHPLibrary.
When this code is executed then it does not increment session variable value.

I am using PHP with apache web server.

<?php

  page_open(array("sess" => "Example_Session"));

# s is a per session variable, u is a per user variable.
  if (!isset($s)) { $s=0; };
  $sess->register("s");
?>
<html>
<body bgcolor="#ffffff">

  <a href="<?php $sess->pself_url()?>">Reload</a> this page to see the counters increment.<br>
  <a href="<?php $sess->purl("showoff.php3")?>">Load</a> a more complex example (login as kris, password test).<br>
  <a href="<?php $sess->purl("defauth.php3")?>">Load</a> the default auth example.<br>
  <a href="<?php $sess->purl("test.php3")?>">Show</a> your phpinfo() page.<br>
  <a href="<?php $sess->purl("logout.php3") ?>">Logout</a> and delete your authentication information.<br>
<?php
  // Demonstration of per session data: We are incrementing a scalar, $s.
  printf("<h1>Per Session Data: %s</h1>\n", ++$s);
?>

  Per Session Data is referenced by session id. The session id is propagated
  using either a cookie stored in the users browser or as a GET style
  parameter appended to the current URL.
  <p>
  Per Session Data is available only on pages using the feature
  &quot;sess&quot; in their page_open() call.
</body>
</html>
<?php
  // Save data back to database.
  page_close()
 ?>

I am not getting any solution of this problem.
Please help me and any help would be highly appreciated.

Thanks
Vivek

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>