<%
set LogonPassword = Request.Form("LogonPassword")
If (Len(LogonPassword) > 0) or (session("StudentID") > 0) then
'Clean data
LogonPassword = replace(LogonPassword,"'","")
' response.write Logon_Name & " "
If (Len(LogonPassword) = 0) then LogonPassword = session("StudentID")
Set DB = Server.CreateObject("ADODB.connection")
DB.Open "ENGR019StudentsWinter2002", "ENGR019Students", "ENGR019Students"
SearchString = "SELECT * FROM Students WHERE (StudentID = " & LogonPassword & ")"
' response.write SearchString & " "
Set DB_Results = DB.Execute(SearchString)
session("StudentID") = 0
while not DB_Results.eof
session("StudentID") = DB_Results("StudentID")
session("FirstName") = DB_Results("FirstName")
session("LastName") = DB_Results("LastName")
DB_Results.MoveNext
wend
if session("StudentID") = 0 then
Session.Timeout = 15
LogonPassword=""
Response.redirect ("EthicsSurvey.asp")
end if
else
session("StudentID") = 0
LogonPassword=""
end if
%>
<%If Len(LogonPassword) = 0 then %>
<% end if %>
<%If session("StudentID") > 0 then
' allow only one logon per session
LogonPassword=""
GetStudents = "SELECT * FROM Students WHERE StudentID=" & session("StudentID")
' Response.Write GetStudents & " "
Set DB_Results = DB.Execute(GetStudents)
%>
Answer the questions below according to following key: 1 - Absolutely Agree 2 - Agree 3 -
Neutral/Undecided 4 - Disagree 5 - Strongly
Disagree