| | |
Need help with Login/Database
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Dec 2007
Posts: 2
Reputation:
Solved Threads: 0
Hi, I need some help with ASP. I''m only familiar with the language but now I have to do project.
I have 3 pages: login.asp, login_script.asp and admin.asp and i'm using access database
When the user logs into the login.asp page, it checks the database to see if that username and password exist, if so, the forms sends it to the login_script.asp and redirect to admin.asp.
Well my script seems to stalled at login_script.asp and refuses to redirect to admin.asp. Like it never gets pass that point. Can someone please help me? Thanks for your time!
database: tnt.mdb, table: user
Fields: loginType, usersname, password, loginType, Company, status
login.asp
the login_script.asp code:
admin.asp
the connection.asp
I have 3 pages: login.asp, login_script.asp and admin.asp and i'm using access database
When the user logs into the login.asp page, it checks the database to see if that username and password exist, if so, the forms sends it to the login_script.asp and redirect to admin.asp.
Well my script seems to stalled at login_script.asp and refuses to redirect to admin.asp. Like it never gets pass that point. Can someone please help me? Thanks for your time!
database: tnt.mdb, table: user
Fields: loginType, usersname, password, loginType, Company, status
login.asp
ASP Syntax (Toggle Plain Text)
<form name="form1" method="post" action="login_script.asp"> <table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td align="right">Username:</td> <td width="439"><input name="username" type="text" class="field" id="username"></td> </tr> <tr> <td align="right">Password:</td> <td><input name="Password" type="password" class="field" id="Password"></td> </tr> <tr> <td align="right"> </td> <td><input type="submit" name="Submit" value="Submit"> <input type="reset" name="Submit2" value="Reset"></td> </tr> </table> </form>
the login_script.asp code:
ASP Syntax (Toggle Plain Text)
<% usersname=request.form("Usersname") password=request.form("Password") If Request.Form("username") = "" AND Request.Form("password") = "admin" Then Session("loggedIn") = True Response.Redirect "admin.asp" end if %>
admin.asp
ASP Syntax (Toggle Plain Text)
<!--#include virtual="connection.asp"--> <% if session("loggedin") <> "admin" then response.redirect "login_admin.asp" end if %>
the connection.asp
ASP Syntax (Toggle Plain Text)
<% 'Create an ADO connection object Set adoCon = Server.CreateObject("ADODB.Connection") 'Set an active connection to the Connection object using a DSN-less connection adoCon.Mode = 3 adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=c:\Inetpub\wwwroot\vmSight\database\tnt.mdb" %>
Last edited by hoasabi; Dec 3rd, 2007 at 5:16 pm.
![]() |
Similar Threads
- Website Login (ASP.NET)
- Database and Website (Database Design)
- Simple ASP.Net Login Page (Using VB.Net) (ASP.NET)
- Database Design Advice (MySQL)
- login (HTML and CSS)
- php help needed for login (PHP)
- mySQL database searching for registration (MySQL)
- Windows 2000 login Problem (Windows NT / 2000 / XP)
Other Threads in the ASP Forum
- Previous Thread: Ho do I change the server time to my own time zone?
- Next Thread: Extracting data from csv then directly put it on body of email with ASP
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection diagnostics dreamweaver excel fso iis microsoft msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption server single specfic sqlserver sqlserverconnection toolkit webserver windows7





