Pasword Form (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


Bnugent -> Pasword Form (3/16/2001 20:18:00)

Good Morning,

I have a simple question that might require a more complex answer. Here is what I am trying to do.

I have a simple form that resides on my home page that consists of a username and password field. Both of these fields are stored in a table on my db that has about 30 columns of additional data. Basically once this form is submitted it sends them to a page that allows them to view their account information on a page called account.asp (a drw page).

Everything is working fine up to this point. Here is what i would like to do.

I would like to add some code that would allow me to do the following. Lets say if someone entered the following information on my form
Username: Spooky
Password: Spooky
It would re-direct and/or send them to a different page other then account.asp

Please note that this username and password would not be listed in the database. Does anyone know how I would accomplish this? Thanks for everyones help.

------------------
Brian---





Elecia -> RE: Pasword Form (3/16/2001 23:38:00)

You know that place in the code where it says that if you record set is empty to show a message something like "No records found."
Right where the message is you can insert this redirect and it will take them where ever you want.

<meta http-equiv="Refresh" content="0; url=Mypagename.asp">

Just insert the correct page name.
EE

[This message has been edited by Elecia (edited 03-16-2001).]





rdouglass -> RE: Pasword Form (3/16/2001 23:45:00)

I am just a beginner with ASP, but I was trying to do a very similar thing and instead sprang the 30 or so bucks for the Spooky Login. I'm VERY glad I did - it saved me a LOT of time and gave me a huge push in the right direction...

(Hopefully this won't be deleted for propoganda reasons.....)


Message left for very good reasons

[This message has been edited by Spooky (edited 03-16-2001).]





Bnugent -> RE: Pasword Form (3/16/2001 13:17:00)

Elecia,
Thanks for your response. I appreciate it very much. I dont quite understand your suggestion. Wouldnt this allow anyone who did not fill in the form to be re-directed. I am loking for what I thought might be a way that would look for a particular username and password once submitted. If this matched what was hard coded, then it would re-direct them to a different page. If there was no match, it would to a typical look up based on the criteria entered and proceed to the db and look for the match and show results on the results page. I am sorry if I am making this more confusing than it is. Thanks again

------------------
Brian---





Elecia -> RE: Pasword Form (3/16/2001 14:25:00)

OK The user comes to the login page enters user and password then they click submit. When they click submit the parameters they entered are passed to a DRW. What happens currently if they are not in your database?
Does the DRW display a message no records found?
EE




Bnugent -> RE: Pasword Form (3/16/2001 14:59:00)

yes. Currently it says:

Sorry, the username you entered does not match the password you entered. Please try again.

I would like to be able to create some code that would first check to see if the values entered matched my statement (that I would create)

if username=bob AND password=admin
then redirect...

if username does not = bob and password does not = admin
then proceed to look up match in DB.

I know this is very elementary but thought it would help.

------------------
Brian---





Bnugent -> RE: Pasword Form (3/20/2001 20:25:00)

Elecia,

Are you still with me on this?

------------------
Brian---





Spooky -> RE: Pasword Form (3/20/2001 19:17:00)

To be honest, using the FP DRW is not a winner for this.
Grab a copy of the basic asp code you can use for my login and if may give you an idea of what can be done, the DRW just is too transparent and gives out too much info that the user can see in code.




Elecia -> RE: Pasword Form (3/21/2001 13:06:00)

So Sorry I dropped the ball on you Brian. I've been really swamped and I completely forgot you. Did you go with Spooky's suggestion?
EE




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625