Reply to Re: Address bar as session

Your name:

Reply:


Posted by Neil Trigger on 09/18/05 15:58

nope, doesn't work on header re-directs....

i tried:
// where was I?
$iamhere=$_SERVER['PHP_SELF'];
if (!$not_here=='yes'){
if(! $_REQUEST['article_id']==''){
$_SESSION['where_last']=$iamhere.'?article_id='.$_REQUEST['article_id'];
}
else{
$_SESSION['where_last']=$iamhere;
}
}
else{}

It works up until the not logged in page, but once I log in (another
re-direct) the link:

<a href="<?php echo $_SESSION['where_last'];?>">Click
here to return to the page you were trying to view.</a>

Comes up with: http://www.magic2k.com/errorpages/404.php which is the 404
error page defined in my htaccess file.

I don't know what I'm doing wrong.

--
Neil Trigger
Magic2k Managing Director
http://www.magic2k.com
http://www.magic2k.co.uk
"qwert" <qwert@eribus.ch> wrote in message
news:432d32c7_3@news.bluewin.ch...
> Neil Trigger schrieb:
>> I've written a membership system for my site, but would like the
>> re-direct script to write the contents of the address bar to a session so
>> that when the user is re-directed, they can simply login, then click on a
>> button to take them back to where they were.
>>
>> I've tried several options, but
>>
>> strrchr($_SERVER['PHP_SELF'], '/')
>>
>> does not give enough code to make it useable.
>>
>> Any ideas?
>>
>> Many thanks.
>>
> you could use $_SERVER['referer'] on the login or the first redirect page
> ...

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация