•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 455,985 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,795 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 1273 | Replies: 4
![]() |
•
•
Join Date: Dec 2007
Posts: 2
Reputation:
Rep Power: 0
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
<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:
<%
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
<!--#include virtual="connection.asp"-->
<%
if session("loggedin") <> "admin" then
response.redirect "login_admin.asp"
end if
%>the connection.asp
<%
'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.
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- 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)
- Website Login (ASP.NET)
- Windows 2000 login Problem (Windows NT / 2000 / XP / 2003)
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


Linear Mode