Jump to content

error while login


Matar

Recommended Posts

hi i make a student login , so when i do it in the localhost it was very good with no error , but when i test it in my hosting i see this error Response object error 'ASP 0156 : 80004005' Header Error /log.asp, line 18 The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page contenplaese help me

Link to comment
Share on other sites

this is the code <%response.cachecontrol = "no-cache"response.expires = -1%><%user=Request.form("user")pass=Request.form("pass")if user = "" then // this is line 18 Response.Redirect("error.asp?error=name_null")elseif pass = "" thenResponse.Redirect ("error.asp?error=pass_null")end if end if Dim conn Dim rs Set Conn = Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.Mappath("/webdata/log.mdb"))set rs = Server.CreateObject("ADODB.recordset") sql= "SELECT * FROM stu WHERE user = '" & Request.Form("user") & "' and pass = '" &Request.form("pass")&"'" set RS = Conn.Execute(SQL)if rs.eof then response.Redirect ("error.asp?error=Name_Entry")elseif rs("pass") <> pass then response.Redirect ("error.asp?error=pass_Entry") end ifend if%> <table border="1" width="100%"><tr><%for each x in rs.Fields%> <% if x.value <>"" then%> <%response.write("<th>" & x.name & "</th>")%> <%end if%><%next%></tr> <%do until rs.EOF%> <tr> <%for each x in rs.Fields%> <% if x.value <>"" then%> <td> <%Response.Write(x.value)&"<br/>"%></td> <%end if%> <%next rs.MoveNext%> </td> <% loopRS.CloseSet RS = nothingConn.CloseSet Conn = nothingsession.abandon%></table><div style="position: absolute; width: 100px; height: 100px; z-index: 2; right: 439px; top: 378px" id="layer2"> </div></body></html>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...