I tring to learn this from a book, but
I keep getting this error:
Response object error 'ASP 0156 : 80004005'
Header Error
/logon.asp, line 26
The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.
Here is my code from Logon.asp:
-----------------------------------------------------
<% @ Language = "VBSCRIPT"%>
<!-- Establish Variable -->
<% Dim oCONv, oRSu %>
<!-- Create Server Object -->
<% Set oCONv = Server.CreateObject("ADODB.Connection" %>
<!-- Open Server Object -->
<% oCONv.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"DBQ=C:\AFPtest\Vault.MDB" %>
<%
If Session("UserID" = "" or Request.Form("UserID" <> "" then
Session("UserID" = ""
Set oRSu = oCONv.Execute("SELECT tblUsers.UserID, tblUsers.Password FROM tblUsers " &_
"WHERE UserID = '" & Request.Form("UserID" &_
"' AND Password = '" & Request.Form("Password" &_
"' AND Date()-32<tblUsers.DAteSold"
if not oRSu.EOF then
Session("UserID" = oRSu("UserID"
Response.Redirect"ok.htm"
else
Response.Redirect "sorry.htm"
end if
end if
%>
-------------------------------------------------
I thank you in advance
-Mike
I keep getting this error:
Response object error 'ASP 0156 : 80004005'
Header Error
/logon.asp, line 26
The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.
Here is my code from Logon.asp:
-----------------------------------------------------
<% @ Language = "VBSCRIPT"%>
<!-- Establish Variable -->
<% Dim oCONv, oRSu %>
<!-- Create Server Object -->
<% Set oCONv = Server.CreateObject("ADODB.Connection" %>
<!-- Open Server Object -->
<% oCONv.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"DBQ=C:\AFPtest\Vault.MDB" %>
<%
If Session("UserID" = "" or Request.Form("UserID" <> "" then
Session("UserID" = ""
Set oRSu = oCONv.Execute("SELECT tblUsers.UserID, tblUsers.Password FROM tblUsers " &_
"WHERE UserID = '" & Request.Form("UserID" &_
"' AND Password = '" & Request.Form("Password" &_
"' AND Date()-32<tblUsers.DAteSold"
if not oRSu.EOF then
Session("UserID" = oRSu("UserID"
Response.Redirect"ok.htm"
else
Response.Redirect "sorry.htm"
end if
end if
%>
-------------------------------------------------
I thank you in advance
-Mike