[dba-VB] OT - HTML & ASP Help Required

paul.hartland at fsmail.net paul.hartland at fsmail.net
Thu May 6 03:12:09 CDT 2004


To all,
 
Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company.  I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory.  On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page.
 
Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc.
 
default.htm code below:
<HTML>
<HEAD>
<TITLE>Orridge Reporting Logon</TITLE>
</HEAD>
<BODY Background="Niceblue.jpg">
            <CENTER>
            <H1><I><FONT FACE="Century" COLOR="WHITE">Orridge & Co. Internet Reporting System</FONT></I></H1>
            <H3><FONT FACE="Century" COLOR="WHITE"><I>Enter Username & Password Below</I></FONT></H2>
            <HR WIDTH="100%">
            <FORM METHOD=Post ACTION="CheckLogin.asp">
            <FONT FACE="Courier New" COLOR="BLACK"><B>Username:</B></FONT> <INPUT TYPE=Text NAME="Username" SIZE="30">
            <P>
            <FONT FACE="Courier New" COLOR="BLACK"><B>Password:</B></FONT> <INPUT TYPE=Password NAME="Password" SIZE="30">
            <P>
            <INPUT TYPE=Reset NAME="Reset" VALUE="Reset"> <INPUT TYPE=Submit NAME="Submit" VALUE="Submit">
            </FORM>
            <HR WIDTH="100%">
            </CENTER>
            </BODY>
</HTML>
 
 
checklogin.asp code is below:
<%@ LANGUAGE="VBSCRIPT" %>
<% Option Explicit %>
 
<!--#Include Virtual="/ADOVBS.INC"-->
<%
            Dim objConn
            Dim objRs
            Dim strSQL
            Set objConn = Server.CreateObject("ADODB.Connection")
            objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; " & _
                                     "DBQ=\\Development\C$\InetPub\Wwwroot\Genesis.mdb"
            objConn.Open
            
            Set objRs = Server.CreateObject("ADODB.RecordSet")
            strSQL = "SELECT * FROM tblUsers WHERE Username = '" & Request.Form("Username") & "'"
            objRs.Open strSQL, objConn
            
            If (objRs.EOF) Then
                        Response.Write "<A HREF='Default.HTM'>"
                        Response.Write "User Not Registered."
                        Response.Write "</A>"
                        Response.End
            Else
                        Response.Write "<A HREF='Default.HTM'>"
                        Response.Write "User Found."
                        Response.Write "</A>"
                        Response.End
            End If
            
            objRs.Close
            Set objRs = Nothing
            objConn.Close
            Set objConn = Nothing
%>
 
Thanks in advance for any help.
 
Paul Hartland

-- 

Whatever you Wanadoo:
http://www.wanadoo.co.uk/time/

This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm


More information about the dba-VB mailing list