its not workin, i have this code on the index.asp page which is the login page and can be viewed here
http://www32.brinkster.com/speirsy/web_coursework/
<%
If Request.Cookies("username") <> "" Then
'Execute login validation here using values from cookies
'Get values from cookies
sUsername = Request.Cookies("username")
sPassword = Request.Cookies("password")
'call doLogin to validate login,
'returns true for valid login
If doLogin(sUsername, sPassword) Then
Response.Redirect("log.asp")''''''log.asp is the page are redirected 2 when u successfully log in''''''''
End If
End If
%>
the values on the login form are userQuery and passwordEntry
on the user.asp page which validates if the username and password are correct when u hit login this code is thre.
<%@ Language="VBScript" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?xml version="1.0" encoding="iso-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
<%
Response.Cookies("userQuery") = sUsername
Response.Cookies("passwordEntry") = sPassword
%>
</head>
<body>
<%
Dim xmlDocument, path, nodes
set xmlDocument = CreateObject("MSXML2.FreeThreadedDOMDocument")
xmlDocument.async = "false"
xmlDocument.load(Server.MapPath("/speirsy/db/user.xml"))
xmlDocument.setProperty "SelectionLanguage", "XPath"
path = "/records/details[username='" & Request.Form("userQuery") & "']"
set nodes = xmlDocument.selectNodes(path)
If nodes.length = 0 Then
Response.write("Please enter a valid username and password</br></br>")
Response.write("<a href='index.asp'>Back to login page</a>")
End If
For Each Node In nodes
For Each Node2 In Node.childNodes
If Node2.nodeName = "password" Then
If Node2.text = Request.Form("passwordEntry") Then
Response.Redirect "log.asp"
else
Response.Write(" please enter a valid password</br></br>")
Response.write("<a href='index.asp'>Back to login page</a>")
End If
End If
Next
Nextlog.asp is the page are redirected 2 when u successfully log in
%>
</body>
</html>
any help would be benificial
thanks again
:(