Page 1 of 1

how can i do this??

Posted: Thu Mar 22, 2012 12:28 am
by azycraze
hi , i have a small cms created of my own which is controlled from single index.php.
I have created some articles which can be accessed only by logged in members.
So if a guest visit for example "http://example.com/article/how-can-i-do-it.php"

he is redirected to the http://example.com/login.php

All i need is when user login from this page , he should be taken to "http://example.com/article/how-can-i-do-it.php"

In normal case when user logins,they are redirected to http://example.com/.

plssss help! :(

Re: how can i do this??

Posted: Thu Mar 22, 2012 3:27 am
by social_experiment
So you want the page accessed when not logged in to be the page you are directed to if you do log in?

Re: how can i do this??

Posted: Thu Mar 22, 2012 5:17 am
by Celauran
Store the requested URL in session data and redirect to it after logging in.

Re: how can i do this??

Posted: Thu Mar 22, 2012 8:46 am
by azycraze
can i use

$_SERVER['REQUEST_URI']

for this