1. You can "create" the current page with a combination of PHP_SELF, QUERY_STRING, etc... Take a look at a phpinfo() page to see all of the variables.
2. You can use ini_set() in your code to change the settings for your sessions or an .htaccess file if your on *nix. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ > -----Original Message----- > From: -<[ Rene Brehmer ]>- [mailto:[EMAIL PROTECTED]] > Sent: Saturday, January 18, 2003 11:04 AM > To: [EMAIL PROTECTED] > Subject: [PHP] 2 Qs: Passing current URL with session and how to avoid > session timeout??? > > Hi gang > > Been trying to figure out this session stuff, but since I was unable to > make the manual sample into something workable, I instead decided to > actually try and make the session do what I need it for: Passing the URL > of the caller page to the page that's being called. > > 1. Only I can't figure out if there's a function to just pull the current > URL and plop it into a session variable. The thing is that these pages are > all built by using a bunch of GET variables in the URL, so it would be > easiest to just do something like: > > $_SESSION['mother'] = $currentURL; > > And then in the called, daughter, page do this: > > <a href=<?php echo("\"$_SESSION['mother']\"") ?>>Get back to where you > came from</a> > > As the only other way I've found is to have it use the string-functions > and re-build the current URL throughout the if-tree that builds the page. > I need to pass the mother URL to the daughter pages because there's two > main entry-points into the daugther pages, and one of them can have 10-15 > different states... > > But how do you pull the current url? ParseURL just smacks it into an > array, and I'll then have to rebuild it anyway ... which makes it about > just as simple as running it through the if-tree. Whether or not the > session-id is inside the URL is not essential to me, but dunno if php > cares about it. > > 2. Since the above is required to function at all times, I need to > override the expiration time. I can't do it in the ini file, 'cause I > can't modify the server where it's to run, and it's set to 0 there... (not > sure if that means it expires right away, or not at all) > > Anyway to do this??? > > TIA > > Rene > -- > Rene Brehmer > > This message was written on 100% recycled spam. > > Come see! My brand new site is now online! > http://www.metalbunny.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php