Hi All!
i want to know any method of how can i redirect to previous page from where i logged on after registering sessions variables..so use doesnt have to navigate throughout the sitemap.
infact i've many pages of login option..i just want that user just puts his user id pwd and registers it in session and redirects to the previous page..how can i accomplish that ? are session variables capable enough for this purpose ?
regards..
redirecting to previous page after registering session value
Moderator: General Moderators
Fadi
If all you want to do is send someone back to the page they were on whilst ensuring the session variables are logged you could simply give them a back button.
If you want to do this automatically, which I suspect would irritate the hell out of your users you could force a refresh and use client side script to send them back.
I'd recommend a back button though as forcing a refresh and back will be very annoying for your users.
If all you want to do is send someone back to the page they were on whilst ensuring the session variables are logged you could simply give them a back button.
If you want to do this automatically, which I suspect would irritate the hell out of your users you could force a refresh and use client side script to send them back.
I'd recommend a back button though as forcing a refresh and back will be very annoying for your users.
submit to itself
Why not just have the page submit to itself and have the page determine which login option to use.
It would save have to use back buttons, header redirection and the like.
It would save have to use back buttons, header redirection and the like.
-
Breckenridge
- Forum Commoner
- Posts: 62
- Joined: Thu Sep 09, 2004 11:10 pm
- Location: Breckenridge, Colorado
if you must; use a header() and pass the session_id
i.e.
i.e.
Code: Select all
<?
header ("location: http://domain.com/page.php?PHPSSID=$YOU ... D_VAR_HERE");
?>Or you could redirect to the previous page by using something like:
untested:
untested:
Code: Select all
<?php
print("<meta http-equiv=refresh content='1; url=http://www.yoursite.com/.".$_SERVER['HTTP_REFERER']."'>");
?>