Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 15th, 2004, 08:46 PM
Authorized User
 
Join Date: Mar 2004
Location: , , .
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to gmoney060 Send a message via MSN to gmoney060
Default User Authentication

Could anyone tell me what is wrong with this script. I am trying to get it to check the value of 2 form fields and check the value of both of them at the same time. If the statement is correct then it redirects the user, otherwise it types a statement. PLEASE HELP!

<%
dim grusername
dim grpassword

grusername = Trim(Request.Form("username"))
grpassword = Trim(Request.Form("password"))

If grusername = usernamesomething ; grpassword = passwordsomething then
redirect("http://www.testing.com/admin/news_update.asp")Else
response.write("User Name and/or Password Incorrect")
%>

 
Old June 16th, 2004, 07:24 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

This:

If grusername = usernamesomething ; grpassword = passwordsomething then
redirect("http://www.testing.com/admin/news_update.asp")Else
response.write("User Name and/or Password Incorrect")

should be:

If grusername = usernamesomething and grpassword = passwordsomething then
  redirect("http://www.testing.com/admin/news_update.asp")
Else
  response.write("User Name and/or Password Incorrect")
End IF

Brian




Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get user name from windows authentication? su C# 1 December 9th, 2006 02:58 AM
user authentication pablohoney Classic ASP Basics 0 October 1st, 2006 11:07 PM
User Authentication problem asif_sharif ASP.NET 1.0 and 1.1 Professional 1 January 1st, 2006 04:48 PM
User Authentication problem asif_sharif ASP.NET 1.0 and 1.1 Professional 1 January 1st, 2006 04:48 PM
User authentication problems bobbby Dreamweaver (all versions) 4 September 28th, 2004 12:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.