Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional 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
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 14th, 2005, 02:10 AM
Friend of Wrox
Points: 686, Level: 9
Points: 686, Level: 9 Points: 686, Level: 9 Points: 686, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Kolkata, West Bengal, India.
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP Login module

Hi everyone,

I have a login module in ASP. Here I have a login page where the user can enter a password, which is being checked in another page and if the password is right then the user is being redirected to the administrative page. the 2 pages involved are index.asp & administrator.asp.In the administrative page the password is being checked if the session("admin") variable contains the correct password then the administrative page opens otherwise control is returned back to the index.asp page.

In the checking page a predetermined password is being associated to the session("admin") variable which is being checked in the administrative page.

However I have to add a change password page which will allow the user to change the original predefined password to a new one. this will happen only once when he first time logs in using the given password.If he changes the password he should be able to login using the new password from the 2nd time onwards.

Here no database table is used to store the password and only session("admin") variable is used to assign the predefined password. I am not able to retain the new password.

Is there any way to go about this.

Any help would be great
Reply With Quote
  #2 (permalink)  
Old October 14th, 2005, 04:54 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

try this,when user click the submit button to set the new password.


<%
session("admin")=request("newpassword")
%>

if possible plz post ur code

Cheers :)

vinod
Reply With Quote
  #3 (permalink)  
Old October 24th, 2005, 12:36 AM
Authorized User
 
Join Date: Jul 2004
Location: Barrie, Ontario, Canada.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is a little routine I use all the time.

Code:
'LOGON SCRIPT
'CompareTypes
'vbTextCompare = 1 /upper and lower case are the same - Textual compare
'vbBinaryCompare = 0 or null /upper case come before lower case - Binary Compare

bolFound = False
Do While Not bolFound
    If (StrComp(username1,username2,vbTextCompare)=0) AND _
               (StrComp(passowrd1,Password2,vbBinaryCompare)=0) Then
        bolFound = True
    Else
        objRS.MoveNext
    End If
Loop


' No match found

If Not bolFound Then
'    InvalidLogin
Else
'    LoginSuccessfull
End If
Reply With Quote
  #4 (permalink)  
Old October 24th, 2005, 12:39 AM
Authorized User
 
Join Date: Jul 2004
Location: Barrie, Ontario, Canada.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ooops seems I mispeled passowrd1. Should be password1, Doh!
I didn't include the Dims as I cut this out of one of my pages code.
Reply With Quote
Reply


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
integrate php module to asp.net 2.0 project?? jigu_2811 ASP.NET 1.0 and 1.1 Professional 2 August 8th, 2011 09:15 AM
How to deploy Crystal reports in asp.net module prasan BOOK: Professional Crystal Reports for VS.NET 1 February 27th, 2007 11:27 PM
How to integrate the PHP Module with Asp.Net amit_avesh@yahoo.co.in ASP.NET 1.0 and 1.1 Professional 2 September 5th, 2006 01:30 PM
integrate the php module with asp.net amit_avesh@yahoo.co.in VS.NET 2002/2003 0 September 5th, 2006 05:31 AM
events module in Building an asp.net intranet nickm All Other Wrox Books 1 August 25th, 2004 01:07 PM



All times are GMT -4. The time now is 12:05 AM.


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