OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

 

Login Only Checking First Session Value

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> Login Only Checking First Session Value
Page: [1]
 
Mav44

 

Posts: 197
Joined: 6/25/2006
Status: offline

 
Login Only Checking First Session Value - 10/17/2009 12:38:19   
I have the following login on my pages and I use it to check the login "auser" and check for rights "admin". I cannot figure why this will not work. It is only checking the first session value and not the second requirred value. Any suggestions?

<%
if session("auser")  = "" then
response.redirect ("login.asp?requester=main.asp")
elseif session("admin")  = "" then
response.redirect ("login.asp?requester=main.asp")
end if
%>
Mav44

 

Posts: 197
Joined: 6/25/2006
Status: offline

 
RE: Login Only Checking First Session Value - 10/17/2009 17:05:55   
I have cleaned this code up to look like:

<%
if session("ausr") = "" or session("admin") = "" then
response.redirect ("login.asp?requester=main.asp")
end if
%>

I have found that since I am using an Access Database even the blank fields are passing a value. Is there a way to define the access blank field? something like

<%
if session("ausr") = "" or session("admin") = empty then
response.redirect ("login.asp?requester=main.asp")
end if
%>

This does not work but you get the idea. I only want grant access to the page to users that have a value in the "admin" field.

(in reply to Mav44)
Mav44

 

Posts: 197
Joined: 6/25/2006
Status: offline

 
RE: Login Only Checking First Session Value - 10/17/2009 17:15:00   
Never mind, I got it:)

<%
if session("ausr") = "" or (len(session("admin") & "") = 0) then
response.redirect ("login.asp?requester=main.asp")
end if
%>

(in reply to Mav44)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> Login Only Checking First Session Value
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts