I guess I'm dense this morning. In response to 1: $_SESSION['mother']=$_SERVER['PHP_SELF'];
and then <a href="<?PHP echo $_SESSION['mother'];?>">Go Back</a> or better yet... <a href="<?PHP echo $_SERVER['PHP_SELF'];?>">Go Back</a> as to #2: I usually just pass this kind of info around on the URL. http://mypage.com/mypage.php?prevURL=http://mypage.com/lastpage.php if I have to pass a full query string then I urlencode() it first and urldecode() it on the other side. This survives sessions expiring. =C= * * Cal Evans * Stay plugged into your audience. * http://www.christianperformer.com * -----Original Message----- From: -<[ Rene Brehmer ]>- [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 18, 2003 10: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