WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Database Discussion Forum This is the place to find help resolving those nagging questions you have about implementing and using all kinds of databases. Need help writing a query? Need an opinion on Oracle? Post here!

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-22-2004, 05:11 PM
tfinch tfinch is offline
WebProWorld Member
 

Join Date: Apr 2004
Location: East Peoria
Posts: 34
tfinch RepRank 0
Default directing with MS Access

Hello, I took over a site that is password protected in certain areas. I saw a database on the site with a password list on it. Depending on the word you type in, it will take you to different sections of the site. I looks simple enough but when I try to get it to work, it doesn't. Does anyone have some help links for ASP? It looks like there are only two pages for this task, plus the database, which is in Access.
What I want to do is make a database that will direct where people go depending on what they type in. For example, business will take you to business/index.htm
Any help is appreciated.
TF
Reply With Quote
  #2 (permalink)  
Old 07-25-2004, 12:28 PM
sslcheap sslcheap is offline
WebProWorld Member
 

Join Date: Mar 2004
Location: Birmingham, Alabama
Posts: 32
sslcheap RepRank 0
Default

Try something like below:

default.asp

<form action=login.asp method=post>
Username <input name=username>
Password <input name=password>
</form>

login.asp

<%
Set adoconn = Server.CreateObject("ADODB.Connection")
adoconn.Provider = "Microsoft.Jet.OLEDB.4.0"
adoconn.ConnectionString = "Data Source=C:\mydir\mydb.mdb"
adoconn.Open
query = "select url from users where username = '" & Request("username") & "' and pw = '" & Request("password") & "'"
set rs = adoconn.execute(query)
if not rs.eof
Response.Redirect("url")
end if
rs.close
set rs = nothing
%>
__________________
Geotrust SSL Certificates
http://sslcheap.com
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum
Tags: access, directing



Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Search Engine Friendly URLs by vBSEO 3.0.0