%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim oConn, oRs
Dim qry, connectstr
Dim SOL
Dim db_name, db_username, db_userpassword
Dim db_server
db_server = "rbastudent.db.3334423.hostedresource.com"
db_name = "rbastudent"
db_username = "rbastudent"
db_userpassword = "RBMaster1"
tablename = "StudentLottery"
connectstr = "Driver={SQL Server};SERVER=" & db_server & ";DATABASE=" & db_name & ";UID=" & db_username & ";PWD=" & db_userpassword
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open connectstr
'qry = "SELECT * FROM " & tablename
'Set oRS = oConn.Execute(qry)
SQL = "SELECT * FROM students_apply"
Set oRS = oConn.Execute(SQL)
if Request.Form("Add") = "Add" Then
if Request.Form("FirstName") = "" Then
Response.Redirect("error2.asp?Error=First Name can't be blank")
End if
if Request.Form("PostalCode") = "" Then
Response.Redirect("error2.asp?Error=Zip Code can't be blank, enter a valid zip code")
End if
if Request.Form("LastName") = "" Then
Response.Redirect("error2.asp?Error=Last Name can't be blank")
End if
if Request.Form("LastName") = "same" Then
Response.Redirect("error2.asp?Error=Last Name can't be same, must be last name")
End if
if Request.Form("DOB") = "" Then
Response.Redirect("error2.asp?Error=Date Of Birth can't be blank")
End if
if Request.Form("Gender") = "" Then
Response.Redirect("error2.asp?Error=Gender can't be blank")
End if
if Request.Form("Address") = "" Then
Response.Redirect("error2.asp?Error=Address Name can't be blank")
End if
if Request.Form("Grade") = "" Then
Response.Redirect("error2.asp?Error=Grade can't be blank")
End if
if Request.Form("FatherFirst") = "" Then
Response.Redirect("error2.asp?Error=Father's First Name can't be blank")
End if
if Request.Form("MotherFirst") = "" Then
Response.Redirect("error2.asp?Error=Mother's First Name can't be blank")
End if
if Request.Form("MotherLast") = "same" Then
Response.Redirect("error2.asp?Error=Mother's First Name, must be the actual name")
End if
if Request.Form("FatherLast") = "same" Then
Response.Redirect("error2.asp?Error=Mother's First Name, must be the actual name")
End if
if Request.Form("County") = "" Then
Response.Redirect("error2.asp?Error=County field for student can't be blank")
End if
if Request.Form("County") = "same" Then
Response.Redirect("error2.asp?Error=County field must contain name of county")
End if
if Request.Form("EmailName") = "" Then
Response.Redirect("error2.asp?Error=you must enter your email address to process form")
End if
if Request.Form("ChildLivesWith") = "" Then
Response.Redirect("error2.asp?Error=you must enter child lives with to process form")
End if
FirstName = Request.Form("FirstName")
MiddleName = Request.Form("MiddleName")
LastName = Request.Form("LastName")
Gender = Request.Form("Gender")
Address = Request.Form("Address")
Address = Replace(Address, "'", " ")
MotherAddress = Replace(MotherAddress, "'", " ")
FatherAddress = Replace(FatherAddress, "'", " ")
City = Request.Form("City")
StateOrProvince = Request.Form("StateOrProvince")
PostalCode = Request.Form("PostalCode")
PhoneNumber = Request.Form("PhoneNumber")
DOB = Request.Form("DOB")
Age = Request.Form("Age")
Grade = Request.Form("Grade")
Race = Request.Form("Race")
Ethnicity = Request.Form("Ethnicity")
EmailName = Request.Form("EmailName")
FatherFirst = Request.Form("FatherFirst")
FatherLast = Request.Form("FatherLast")
FatherOccupation = Request.Form("FatherOccupation")
FatherPhone = Request.Form("FatherPhone")
FatherAddress = Request.Form("FatherAddress")
FatherCity = Request.Form("FatherCity")
FatherState = Request.Form("FatherState")
FatherCounty = Request.Form("FatherCounty")
FatherZip = Request.Form("FatherZip")
FatherEmail = Request.Form("FatherEmail")
MotherFirst = Request.Form("MotherFirst")
MotherLast = Request.Form("MotherLast")
MotherAddress = Request.Form("MotherAddress")
MotherCity = Request.Form("MotherCity")
MotherState = Request.Form("MotherState")
MotherZip = Request.Form("MotherZip")
MotherCounty = Request.Form("MotherCounty")
MotherOccupation = Request.Form("MotherOccupation")
MotherEmail = Request.Form("MotherEmail")
MotherPhone = Request.Form("MotherPhone")
FormerSchool = Request.Form("FormerSchool")
FormerSchoolAddress = Request.Form("FormerSchoolAddress")
FormerSchoolPhone = Request.Form("FormerSchoolPhone")
Sibling = Request.Form("Sibling")
Notes = Request.Form("Notes")
Notes = Replace(Notes, "'", " ")
MobilePhone = Request.Form("MobilePhone")
ChildLivesWith = Request.Form("ChildLivesWith")
SchoolApplied = "Charter Day School"
DateSubmitted = Now
SQLAdd = "INSERT INTO students_apply(FirstName,MiddleName,LastName,Gender,Address,City,State,ZipCode,County,PhoneNumber,DOB,Age,Grade,Race,Ethnicity,Email,FatherFirst,FatherLast,FatherOccupation,FatherPhone,FatherAddress,FatherCity,FatherState,FatherCounty,FatherEmail,FatherZipCode,MotherFirst,MotherLast,MotherAddress,MotherCity,MotherState,MotherZipCode,MotherCounty,MotherOccupation,MotherEmail,MotherPhone,FormerSchool,Notes,FormerSchoolAddress,FormerSchoolPhone,Sibling,MobilePhone,ChildLivesWith,SchoolApplied,DateSubmitted)Values('"
SQLAdd = SQLAdd &FirstName&"','"&MiddleName&"','"&LastName&"','"&Gender&"','"&Address&"','"&City&"','"&StateOrProvince&"','"&PostalCode&"','"&County&"','"&PhoneNumber&"','"&DOB&"','"&Age&"','"&Grade&"','"&Race&"','"&Ethnicity&"','"&EmailName&"','"&FatherFirst&"','"&FatherLast&"','"&FatherOccupation&"','"&FatherPhone&"','"&FatherAddress&"','"&FatherCity&"','"&FatherState&"','"&FatherCounty&"','"&FatherEmail&"','"&FatherZip&"','"&MotherFirst&"','"&MotherLast&"','"&MotherAddress&"','"&MotherCity&"','"&MotherState&"','"&MotherZip&"','"&MotherCounty&"','"&MotherOccupation&"','"&MotherEmail&"','"&MotherPhone&"','"&FormerSchool&"','"&Notes&"','"&FormerSchoolAddress&"','"&FormerSchoolPhone&"','"&Sibling&"','"&MobilePhone&"','"&ChildLivesWith&"','"&SchoolApplied&"','"&DateSubmitted&"')"
oConn.Execute SQLAdd
oConn.Close
Set oConn = nothing
Response.Redirect("studentapplicationdone.asp")
Else
%>
| |
2010-2011 Charter Day School
ONLINE APPLICATION FOR OPEN STUDENT ENROLLMENT
We are currently accepting applications. Please Disable all Pop-Up Blockers.
|
|
|
|
|