Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (General)
 Can't Login/Logout from post.asp
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

nylonTiger
Starting Member

9 Posts

Posted - 24 April 2003 :  14:21:35  Show Profile  Send nylonTiger a Yahoo! Message
Line 50-53 make it impossible to login/logout from post.asp page.
if Request.QueryString("method") <> "" then
	strRqMethod = chkString(Request.QueryString("method"), "SQLString")
else
	Response.Redirect("default.asp")
end if

The following code will fix the problem
if Request.QueryString("method") <> "" then
	strRqMethod = chkString(Request.QueryString("method"), "SQLString")
elseif not (Request("Method_Type") <> "") then
	Response.Redirect("default.asp")
end if

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 24 April 2003 :  14:31:05  Show Profile
This is not a bug, this was done on purpose.
Go to Top of Page

nylonTiger
Starting Member

9 Posts

Posted - 24 April 2003 :  14:33:21  Show Profile  Send nylonTiger a Yahoo! Message
Can you explain the purpose?
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 24 April 2003 :  15:59:23  Show Profile
because it caused problems with redirects after logging in/logging out, usually resulting in a person getting stuck in a loop. Why would anyone need to login/logout on the post.asp page? Personally, I wanted to only allow logging in/logging out from default.asp only.
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 24 April 2003 :  17:43:40  Show Profile
quote:

elseif not (Request("Method_Type") <> "") then



I always have hard time understanding statements as above and find my head spinning and eyes rolling from side to side...
Go to Top of Page

nylonTiger
Starting Member

9 Posts

Posted - 24 April 2003 :  17:55:57  Show Profile  Send nylonTiger a Yahoo! Message
Richard,

I don't have any problem with this code. Could you tell me which steps will make me stuck in a loop.
quote:
Why would anyone need to login/logout on the post.asp page?

It catches my notice when I'm at post.asp page and want to logout. I have to click the logout button one more time at default.asp.

Thanks
Go to Top of Page

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 24 April 2003 :  18:03:56  Show Profile
quote:
Originally posted by GauravBhabu

quote:

elseif not (Request("Method_Type") <> "") then



I always have hard time understanding statements as above and find my head spinning and eyes rolling from side to side...



You mean it's not needed?
like
if num = 1 then
 do something
elseif num <> 1 then
 do something else
end if

The UK MkIVs Forum
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 24 April 2003 :  20:33:17  Show Profile
Why not just use
elseif (Request("Method_Type") = "") then
instead of Not (Not Nothing) I am confused.

Edited by - GauravBhabu on 24 April 2003 20:33:47
Go to Top of Page

nylonTiger
Starting Member

9 Posts

Posted - 24 April 2003 :  23:46:31  Show Profile  Send nylonTiger a Yahoo! Message
That one won't work.
If you want an alternative, use this
elseif trim(Request("Method_Type") & "") = "" then
or
elseif (Request("Method_Type") <> "login") and (Request("Method_Type") <> "logout") then
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 25 April 2003 :  03:09:35  Show Profile
quote:
Originally posted by GauravBhabu

Why not just use
elseif (Request("Method_Type") = "") then
instead of Not (Not Nothing) I am confused.


We spent weeks in school using boolean algebra to simplify statements. I'm with you on this one

======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

nylonTiger
Starting Member

9 Posts

Posted - 25 April 2003 :  10:34:37  Show Profile  Send nylonTiger a Yahoo! Message
Hi,

I'm sorry about my bad statement. But could you please focus on the main matter.
Will I have any problems as Richard's reply or not?

Thx
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 25 April 2003 :  11:16:21  Show Profile
nylonTiger, the redirect to default.asp when logging in/out from post.asp as Richard has mentioned is intentional to avoid some looping problems.

The Dev team must have had the reasons to leave the code as is rather then find some alternatives.

I have an idea to fix this problem and I will post if I get time to test.

However try commenting out the following lines and see what happens.

'else
	'Response.Redirect("default.asp")
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.36 seconds. Powered By: Snitz Forums 2000 Version 3.4.07