Click to See Complete Forum and Search --> : Login Url Managment


hdogg
08-06-2007, 01:23 PM
I successfully use user authentication thru $_SESSIONS

The problem:
When a user clicks a link, and if they are not sign in, it takes them back to the home page...

I would like an unlogged in user to be able to click the link, ask them to sign in, and after signing in take them to the page they originally requested.

-HDogg

mitchell
08-06-2007, 01:52 PM
could you give me the session code trough email please , as ive been looking everywhere for a session php

i could have a look at it if you give it me as i have experience with user login codes

knowj
08-06-2007, 02:04 PM
header("Location: index.php?ref=".$_SERVER['REQUEST_URI']);
exit;

hdogg
08-06-2007, 05:07 PM
That almost works! however.... Request_URI returns as the last requested page... which is the login_form_process.php page. To get it to go the the item.php page should i store "item.php" as another server variable?

knowj
08-07-2007, 01:11 AM
i usually store the $ref into a hidden input and post it with the login