Security using forms

This is a discussion on "Security using forms" within the Classic ASP section. This forum, and the thread "Security using forms are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Mar 30th, 2007, 13:53
New Member
Join Date: Mar 2007
Location: England
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Security using forms

Hi Im new to ASP so please bare with me. I have a website and on that website i would like a username and password setup. now depending on the username and password put in it needs to be redirected to a different iis server page. i.e if you put in the username. testuser it would pass you to http://servername/testuser.

Does anyone have any ideas of where i can start looking?

Like i said i am new to ASP so this probably seems quite simple to someone but not to me....Yet!

Many thanks,

Thegarrett
Reply With Quote

  #2 (permalink)  
Old Apr 13th, 2007, 16:38
JustinStudios's Avatar
SuperMember

SuperMember
Join Date: Mar 2007
Location: USA
Posts: 406
Blog Entries: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to JustinStudios
Re: Security using forms

I just now found this thread... sorry it took so long to reply... but yes this can be done quite easily...

What you need to do is create a database that has 3 fields.

1) Username
2) Password
3) Url

Then when the user logs in it checks if Username = (any username in the database) then see if the password matches the field where username (in database) is = to username (on form).

Then you need to include something that will send the url to the browser depending on success...

Let's say you got the username and password and they passed. So we set variable success = 1. If it didn't we set variable success = 0. Lets also say that you set your recordset query = rsquery here's some code below to do the browser.

Code: Select all
if success = 1 then
   response.redirect(rsquery("Url"))
else
   response.redirect("http://servername/failed.asp")
end if

Last edited by JustinStudios; Apr 13th, 2007 at 16:39. Reason: mistyped code tags
Reply With Quote
Reply

Tags
asp, forms, security

Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
CMS Security ChrisTheSoul Web Page Design 5 Feb 21st, 2008 16:28
php security saltedm8 PHP Forum 22 Sep 27th, 2007 09:22
Help with security wiggles Website Planning 16 Apr 9th, 2007 22:28
PHP forms/security ktsirig PHP Forum 2 Sep 26th, 2005 18:41


All times are GMT. The time now is 20:55.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43