Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-18-2008, 07:39 PM   PM User | #1
MLG
New to the CF scene

 
Join Date: Dec 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
MLG is an unknown quantity at this point
Conditional Login with no database

Hello.

I'm trying to create a very, very simple site for internal use. Basically, I need to have two predetermined users with passwords (ie. "user1" "password1" and "user2" "password2") who would see almost the same content, but user1 would see an additional navigation button or paragraph.

I know this isn't the most secure way, but we aren't too concerned about that for this content. I'd like to be able to do it without creating a database or building out two nearly identical sites, but I'm completely new to asp and at a loss as to how to make this happen. Is this possible?

Can anyone help me out? Or point me in the right direction of resources to make this happen that are written in "dummies" language because so much of what I've read is still over my head? Or even give me better terminology as to what I'm trying to do to help refine my searching?

Any help would be greatly appreciated.
Thanks!
MLG is offline   Reply With Quote
Old 12-19-2008, 12:18 AM   PM User | #2
brazenskies
Regular Coder

 
Join Date: May 2008
Location: Oxford, UK
Posts: 422
Thanks: 14
Thanked 27 Times in 27 Posts
brazenskies is on a distinguished road
Code:
<%

dim user1
dim user1password

user1 = "theUserName1"
user1password = "thePassword1"

dim user2
dim user2password

user2 = "theUserName2"
user2Password = "thePassword2"

if (request.form("user") = user1) and (request.form("password") = user1Password) then
response.write("You are logged in as user 1")

elseif (request.form("user") = user2) and (request.form("password") = user2Password) then
response.write("You are logged in as user 2")

else
response.write("piss off")
end if

%>
I'm drunk right now but that should sort you out. Replace the response.write with whatever you want!

Last edited by brazenskies; 12-19-2008 at 12:23 AM..
brazenskies is offline   Reply With Quote
Old 12-20-2008, 11:16 AM   PM User | #3
brazenskies
Regular Coder

 
Join Date: May 2008
Location: Oxford, UK
Posts: 422
Thanks: 14
Thanked 27 Times in 27 Posts
brazenskies is on a distinguished road
don't know why I bother
brazenskies is offline   Reply With Quote
Old 12-22-2008, 01:24 PM   PM User | #4
Spudhead
Senior Coder

 
Spudhead's Avatar
 
Join Date: Jun 2002
Location: London, UK
Posts: 1,856
Thanks: 8
Thanked 110 Times in 109 Posts
Spudhead is on a distinguished road
:d:d:d:d
Spudhead is offline   Reply With Quote
Old 12-23-2008, 02:10 PM   PM User | #5
MLG
New to the CF scene

 
Join Date: Dec 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
MLG is an unknown quantity at this point
Thanks Brazenskies. Sorry to not respond. I got sick and haven't been functioning since my post. Looks like this will get me started off in a much better direction than where I was. I appreciate your help.
MLG is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:17 AM.


Advertisement
Log in to turn off these ads.