Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - login_user_test.asp
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

login_user_test.asp

 Post Reply Post Reply
Author
ForumDummy View Drop Down
Groupie
Groupie


Joined: 04 December 2006
Status: Offline
Points: 58
Post Options Post Options   Thanks (0) Thanks(0)   Quote ForumDummy Quote  Post ReplyReply Direct Link To This Post Topic: login_user_test.asp
    Posted: 27 December 2006 at 1:47am
In login_user_test.asp there are a few lines of code as follows:

'Redirect the user back to the forum they have just come from
ElseIf intForumID > 0 Then
     strReturnPage = "forum_topics.asp?" & removeAllTags(Request.QueryString)
'Return to forum homepage
Else
     strReturnPage = "default.asp" & strQsSID1
End If

Is there a way to write this so that after a successful login the members are redirected back to the page they were on prior to login? In other words the page they were on prior to insufficient_permission.asp. I am trying to do this for non-forum pages that require login.
Back to Top
MrMellie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 December 2006
Location: United Kingdom
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote MrMellie Quote  Post ReplyReply Direct Link To This Post Posted: 27 December 2006 at 8:39pm
I will be needing the same functionality for the same reasons, so if no-one else comes up trumps before me, I may solve it at some point soon.
Back to Top
beyaz_seytan View Drop Down
Groupie
Groupie


Joined: 15 October 2004
Location: Turkey
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote beyaz_seytan Quote  Post ReplyReply Direct Link To This Post Posted: 28 December 2006 at 2:06pm
himm

You add this in Login user form

<input type="hide" name="feefback" value="<% = Request.ServerVariables("HTTP_REFERER") %>">

and you add to login_user.asp files

<%
Dim strFeedBackURL

strFeedBackURL = Request.form("feefback")

Session("FeedBackURL") = strFeedBackURL
%>

Later


Redirect the user back to the forum they have just come from
ElseIf intForumID > 0 Then
     strReturnPage = "forum_topics.asp?" & removeAllTags(Request.QueryString)
'Return to forum homepage
Else
     strReturnPage = "default.asp" & strQsSID1
End If
remove here and write


if Len(Session("FeedBackURL"))> 0 AND not isNull(Session("FeedBackURL")) Then
    Response.ReDirect Session("FeedBackURL")
else
    Response.ReDirect "Default.asp"
end if


evertime real referrer feed back :)
Response.write "Asp"
Document.write("JavaScript")
Echo("Php")
WriteIn('Pascal-Delphi')
Printf("C")

Mail & GTalk : BeyazSeytan@gmail.com
Back to Top
ForumDummy View Drop Down
Groupie
Groupie


Joined: 04 December 2006
Status: Offline
Points: 58
Post Options Post Options   Thanks (0) Thanks(0)   Quote ForumDummy Quote  Post ReplyReply Direct Link To This Post Posted: 28 December 2006 at 4:15pm
Originally posted by beyaz_seytan beyaz_seytan wrote:



Redirect the user back to the forum they have just come from
ElseIf intForumID > 0 Then
     strReturnPage = "forum_topics.asp?" & removeAllTags(Request.QueryString)
'Return to forum homepage
Else
     strReturnPage = "default.asp" & strQsSID1
End If
remove here and write


if Len(Session("FeedBackURL"))> 0 AND not isNull(Session("FeedBackURL")) Then
    Response.ReDirect Session("FeedBackURL")
else
    Response.ReDirect "Default.asp"
end if


evertime real referrer feed back :)


Are you sure about this?  I get an error message that says "Expected 'End'"

We have end if, what more do we need?
Back to Top
beyaz_seytan View Drop Down
Groupie
Groupie


Joined: 15 October 2004
Location: Turkey
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote beyaz_seytan Quote  Post ReplyReply Direct Link To This Post Posted: 28 December 2006 at 6:22pm
himm this line is else if command :
ElseIf intForumID > 0 Then
you fine start of "if" command line and remote at

if ....
...
...
elseif..
...
end if
Response.write "Asp"
Document.write("JavaScript")
Echo("Php")
WriteIn('Pascal-Delphi')
Printf("C")

Mail & GTalk : BeyazSeytan@gmail.com
Back to Top
ForumDummy View Drop Down
Groupie
Groupie


Joined: 04 December 2006
Status: Offline
Points: 58
Post Options Post Options   Thanks (0) Thanks(0)   Quote ForumDummy Quote  Post ReplyReply Direct Link To This Post Posted: 29 December 2006 at 6:14am
Is this wrong?


If blnLoggedInOK = False Then
     strReturnPage = "login_user.asp?" & removeAllTags(Request.QueryString)
ElseIf Request.QueryString("M") = "Unsubscribe" Then
     strReturnPage = "email_notify.asp?" & removeAllTags(Request.QueryString)
'Redirect the user back to the forum they have just come from

ElseIf intForumID > 0 Then
     strReturnPage = "forum_topics.asp?" & removeAllTags(Request.QueryString)
if Len(Session("FeedBackURL"))> 0 AND not isNull(Session("FeedBackURL")) Then
    Response.ReDirect Session("FeedBackURL")
else
    Response.ReDirect "Default.asp"
end if
Back to Top
beyaz_seytan View Drop Down
Groupie
Groupie


Joined: 15 October 2004
Location: Turkey
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote beyaz_seytan Quote  Post ReplyReply Direct Link To This Post Posted: 29 December 2006 at 8:11pm
If blnLoggedInOK = False Then

     strReturnPage = "login_user.asp?" & removeAllTags(Request.QueryString)

ElseIf Request.QueryString("M") = "Unsubscribe" Then

     strReturnPage = "email_notify.asp?" & removeAllTags(Request.QueryString)

'Redirect the user back to the forum they have just come from

ElseIf Len(Session("FeedBackURL"))> 0 AND not isNull(Session("FeedBackURL")) Then
    Response.ReDirect Session("FeedBackURL")
else
    Response.ReDirect "Default.asp"
end if
Response.write "Asp"
Document.write("JavaScript")
Echo("Php")
WriteIn('Pascal-Delphi')
Printf("C")

Mail & GTalk : BeyazSeytan@gmail.com
Back to Top
beyaz_seytan View Drop Down
Groupie
Groupie


Joined: 15 October 2004
Location: Turkey
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote beyaz_seytan Quote  Post ReplyReply Direct Link To This Post Posted: 30 December 2006 at 8:04am
so sorry i was write

strFeedBackURL = Request.form("feefback")
is not feefback u move "feedback"
Response.write "Asp"
Document.write("JavaScript")
Echo("Php")
WriteIn('Pascal-Delphi')
Printf("C")

Mail & GTalk : BeyazSeytan@gmail.com
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.