how do you pass session variables?
| From: | Paulson, Joseph V. \"Jay\" | Date: | Thu, 26 Oct 2000 21:51:49 +0000 |
| Subject: | how do you pass session variables? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-22215@lists.php.net to get a copy of this message | ||
Quick question...
I'm working on a site and I can't use cookies so I was wondering how do I
pass session variables from page to page without them? For example, I have
one page that has $counter and I want that value to be pass to each page and
count how many pages a user goes to before leaving. Are there several ways
of doing this whitout cookies, without cramming the URL full of stuff,
without using a database, or a flat file? I know that in the php.ini I have
the session.save_handler = files so that php will produce it's own file per
session but I thought the session variables where stored in this file when
you run session_register(). Below is what I have tried.
I have tried this:
First page:
session_start();
$count = isset($count) ? $count + 1 : 0;
session_register("count");
Second page:
session_start();
session_register("count");
$count = $count + 1;
Third page same as second etc...
Thanks for any help!
Jay Paulson