Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Newbie - stupid question?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Newbie - stupid question?

 Post Reply Post Reply
Author
Berry View Drop Down
Newbie
Newbie
Avatar

Joined: 05 August 2003
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Berry Quote  Post ReplyReply Direct Link To This Post Topic: Newbie - stupid question?
    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



Edited by Berry
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post 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?

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Berry View Drop Down
Newbie
Newbie
Avatar

Joined: 05 August 2003
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Berry Quote  Post ReplyReply Direct Link To This Post Posted: 05 August 2003 at 3:28am

 

 

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

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.