Print Page | Close Window

Newbie - stupid question?

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=4755
Printed Date: 30 March 2026 at 10:06am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Newbie - stupid question?
Posted By: Berry
Subject: Newbie - stupid question?
Date Posted: 05 August 2003 at 3:19am
< =text/>xZwyso(1,"xZwTimeout('enableDesignMode()', 20);");

 

This is what I'm aiming for: Only certain users can download certain files - is this the right way to go?

Users.asp

<% 
If Username = BenAppleby and password = password Then
Response.Redirect ("BenAppleby.htm")
Else
Response.Redirect (whoareyou.asp)
End If
%>

This links from the form page but the result always goes to BenAppleby.htm regardless of usersname and password.

Any feedback is good feedback.

Cheers




Replies:
Posted By: Mart
Date Posted: 05 August 2003 at 3:23am

<%
Dim Username
Dim Password

username = request.form("Username")
password = request.form("password")

If Username = "BenAppleby" and password = "password" Then
Response.Redirect ("BenAppleby.htm")
Else
Response.Redirect (whoareyou.asp)
End If
%>

Its not secure though you should really run it against a database, and i don't have a clue about < =text/>xZwyso(1,"xZwTimeout('enableDesignMode()', 20);"); what are you trying to do?



Posted By: Mart
Date Posted: 05 August 2003 at 3:25am
This is because variables start off with null and BenAppleby is a string so is password and strings have to have " " around them or it is considered a variable


Posted By: Berry
Date Posted: 05 August 2003 at 3:28am

 

 

Thanks very much!  (it's been anoying me for ages)! Nice one.




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