<%@ Language=VBScript %> ENGR290 Student Survey <% set LogonPassword = Request.Form("LogonPassword") If Len(LogonPassword) > 0 then 'Clean data LogonPassword = replace(LogonPassword,"'","") ' response.write Logon_Name & "
" Set DB = Server.CreateObject("ADODB.connection") DB.Open "ENGR290Students", "ENGR290Students", "ENGR290Students" 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 ("StudentSurvey.asp") end if else session("StudentID") = 0 LogonPassword="" end if %>
ENGR290 Student Survey
<%If Len(LogonPassword) = 0 then %>
Login with your Student ID#
<% end if %>
<%If Len(LogonPassword) = 0 then %> <% end if %>

 


Logon Password

<%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) %>
" id="StudentEntry" method="post">

 First Name 

<%=DB_Results("FirstName")%>

 Last Name 

<%=DB_Results("LastName")%>

Grade Level

 Major 

">

College

 High School 

">

 Where are you from 

">

 E-Mail 

">

<% end if %>