Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Suggestions » Login return to the page you were on..
Show: Today's Messages :: Unread Messages :: Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Return to the default flat view Create a new topic Submit Reply
Login return to the page you were on.. [message #646] Wed, 20 February 2002 19:09 Go to previous message
seang is currently offline  seang   Australia
Messages: 5
Registered: February 2002
Location: Australia
Junior Member
add to buddy list
ignore all messages by this user
Hi there,

I think this would be a nice feature....

(Sorry about my messy code...but I am sure you will get the Idea)

On the page you detect the incorrect login:
$url = sprintf("%s%s%s","http://",$HTTP_HOST,$SCRIPT_NAME);
if !logged in then forward them to the login and send the url where you were at and and imporant info.

echo "<html><head><meta http-equiv=\"Refresh\" content=\"0; URL=".$root_dir."login.php?url=".$url.$query_string1."\ "><script language=\"JavaScript\">\n<!-- setTimeout(\"window.location = unescape('".$root_dir."login.php?url=".$url.$query_string1.& quot;')\",2000);\n //-->\n</script>\n</head>";

Header alway screw up for me incertain instances....and the meta redirect has trouble with one of the Opera browsers.

When you are at the login, set the default page if empty..

if (!($url_send) or ($url_send == "http://www.webdesigners.net.au/login.php")) {$url_send = $root_dir."community.php";}

In the login form have the old url and any important info:
<input name="url_send" type="hidden" value="<? echo $url ?>">
<? echo $query_form ?>

Then when every thing is ok again send them back
echo "<meta http-equiv=\"Refresh\" content=\"0;url=".$url_send."?".$query_string1."\& quot;><script language=\"JavaScript\">\n<!--\n setTimeout(\"window.location = unescape('".$url_send."?".$query_string1."')\",200 0);\n //-->\n</script>\n</head>";

Hope this is useful



[Message index]
Read Message
Read Message
Read Message
Previous Topic: Multi-linual input
Next Topic: installation suggestion
Goto Forum:

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat May 25 23:40:16 EDT 2024

Total time taken to generate the page: 0.05483 seconds