% Dim strCode Dim blnAllowed strCode = Request("code") If strCode = "" Then DoHeader %>
You must enter a school code <% DoFooter Response.End End If adoConnection.Open adoConnection.ConnectionString adoRecordSet.Open "Select * FROM tblSchools WHERE code=""" & strCode & """", adoConnection If adoRecordSet.EOF Then DoHeader %>
You must enter a valid school code <% DoFooter Response.End End If If adoRecordSet("allowed") = "false" Then DoHeader %>
This school is not allowed to use this system <% DoFooter Response.End End If Response.Cookies("NAS")("CODE") = adoRecordSet("code") Response.Cookies("NAS")("NAME") = adoRecordSet("name") adoRecordSet.Close adoConnection.Close Response.Redirect("http://www.nationalachiever.com/certs/display.asp") %>