Wrox Programmer Forums
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 8th, 2003, 06:13 PM
Registered User
Join Date: Dec 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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!



<body bgcolor="#003300" >
<% session.abandon() %>
Today is <%=now%>
<center><table width="767" border="0">
    <th scope="col"><img src="nu.jpg" width="241" height="114"></th>
<form action="file.asp" method="post">
<input type=hidden name="txtAction" value="login">

Welcome to the Online System!<br>
  Please login...<br>

    <table border =1>
  <td><Strong>User Name:</strong></td>
    <input type="text" name="txtusername" size="20">
    <input type="password" name="txtpassword" size="20">
  <tr><td colspan="2" align="center">
    <input type="submit" name="loginButton" value="Login">
    <input type="reset" name="reset" value="Clear">


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing session variables from login page. captainzorro Classic ASP Components 1 April 23rd, 2008 11:54 PM
Session/Cookie Expires, Login page appears rajn ASP.NET 1.0 and 1.1 Professional 3 June 27th, 2007 06:19 AM
Passing Session Variables to the Next Page jim.sullivan@telus.net ASP.NET 1.0 and 1.1 Professional 1 August 1st, 2004 06:25 PM
Passing Session Variables to the Next Page jim.sullivan@telus.net Classic ASP Databases 2 August 1st, 2004 01:59 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.