login page and session variables
Could really use some help from all you experts that deal with ASP, VBSCRIPT, and Oracle databases (SQL)...
I'm having trouble creating the code. I've created a login page that will ask the user for a username and password. This username and password is supposed to be authenticated through the Oracle connect string (strconn = "Driver={Oracle ODBC Driver};dbq=is6065;Uid=username;Pwd=password") rather than a recordset. There is no table in the database with usernames and passwords. The assignment is to have the user log in to the Oracle database.
If the username and password combination fails, the user is prompted with a message and redirected to the login page. If the authentication is successful, the user is directed to a studentList.asp file.
Also, I'm supposed to use session variables to allow the user to go to other pages without having to log on multiple times.
My trouble is not knowing how to code the part after obtaining the username and password from the user. I'm supposed to somehow get this two variables into the connect string statement and verify? How do I do that? Where and how are the session variables set up?
Code for the initial login page is provided below.
Please help!
sc
----------------------------------------
<html>
<head>
<title>Welcome!</title>
</head>
<body bgcolor="#003300" >
<% session.abandon() %>
Today is <%=now%>
<p> </p>
<p> </p>
<center><table width="767" border="0">
<tr>
<th scope="col"><img src="nu.jpg" width="241" height="114"></th>
</tr>
</table></center>
<form action="file.asp" method="post">
<input type=hidden name="txtAction" value="login">
<center>
Welcome to the Online System!<br>
</br>
Please login...<br>
</br>
<table border =1>
<tr>
<td><Strong>User Name:</strong></td>
<td>
<input type="text" name="txtusername" size="20">
</td>
</tr>
<tr>
<td><Strong>Password</strong></td>
<td>
<input type="password" name="txtpassword" size="20">
</td>
</tr>
<tr><td colspan="2" align="center">
<input type="submit" name="loginButton" value="Login">
<input type="reset" name="reset" value="Clear">
</td>
</tr>
</table>
</center>
</form>
</body>
</html>
|