Print Page | Close Window

login_user_test.asp

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Modifications
Forum Description: Mod's and Add-on's for Web Wiz Forums.
URL: https://forums.webwiz.net/forum_posts.asp?TID=22277
Printed Date: 30 March 2026 at 12:17pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: login_user_test.asp
Posted By: ForumDummy
Subject: login_user_test.asp
Date 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.



Replies:
Posted By: MrMellie
Date 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.


Posted By: beyaz_seytan
Date 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


Posted By: ForumDummy
Date 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?


Posted By: beyaz_seytan
Date 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


Posted By: ForumDummy
Date 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


Posted By: beyaz_seytan
Date 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


Posted By: beyaz_seytan
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net