Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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")
%>

  #2 (permalink)  
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
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 03:09 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.