
April 7th, 2005, 05:36 PM
|
|
Registered User
|
|
Join Date: Feb 2005
Posts: 21
Time spent in forums: 8 h 22 m
Reputation Power: 0
|
|
|
Email?
Code:
<%
Response.CacheControl = "Private"
Response.Expires = 0
'===================================
'Dimensiion varaibles and constants
'===================================
Dim strFirstName, strLastName
Dim strSocialSecurityNumber
Dim strDateOfBirth
Dim strHomePhone
Dim strEmailAddress
Dim strStartYear
Dim strStartTerm
Dim strGraduationMonth
'================================================= =
'RETRIEVE VALUES FROM FORM AND STORE IN VARIABLES
'================================================= =
strFirstName = Request.Form("txtFirstName")
strLastName = Request.Form("txtLastName")
strSocialSecurityNumber = Request.Form("txtSocialSecurityNumber")
strDateOfBirth = Request.Form("txtDateOfBirth")
strHomePhone = Request.Form("txtHomePhone")
strEmailAddress = Request.Form("txtEmailAddress")
strStartYear = Request.Form("optStartYear")
strStartTerm = Request.Form("optStartTerm")
strGraduationMonth = Request.Form("radGraduationMonth")
Sub DisplayFormValues()
Call WriteTableHeader()
Call WriteTableBody()
Call WriteTableFooter()
End Sub 'DisplayFormValues
Sub WriteTableHeader()
Dim strBuffer
strBuffer = "<table border='1' cellpadding='3' cellspacing='0' width='580'>"
Response.Write strBuffer
End Sub 'WriteTableHeader()
Sub WriteTableBody()
Call WriteStudentInformation()
Call WriteCollegePlans()
End Sub
Sub WriteTableFooter()
Dim strBuffer
strBuffer = "</table>"
Response.Write strBuffer
End Sub
'================================================= =====
'SectionHeader for Student Data
'================================================= =====
Sub WriteStudentInformation()
Dim strField, strValue
Call WriteSectionHeader ("Student Data")
strField = "Student's Name:"
strValue = strFirstName & " " & strLastName
WriteRow strField, strValue
strField = "Social Security Number:"
strValue = strSocialSecurityNumber
WriteRow strField, strValue
strField = "Date Of Birth:"
strValue = strDateOfBirth
WriteRow strField, strValue
strField = "Home Phone:"
strValue = strHomePhone
WriteRow strField, strValue
strField = "Email Address:"
strValue = strEmailAddress
WriteRow strField, strValue
End Sub
'================================================= =====
'SectionHeader for College Plans
'================================================= =====
Sub WriteCollegePlans()
Dim strField, strValue
Call WriteSectionHeader ("College Plans")
strField = "Start Year:"
strValue = strStartYear
WriteRow strField, strValue
strField = "Start Term:"
strValue = strStartTerm
WriteRow strField, strValue
strField = "Expected Graduation Month:"
strValue = strGraduationMonth
WriteRow strField, strValue
End sub
'================================================= =====
'Table setup to find values for SectionHeaders
'================================================= =====
Sub WriteSectionHeader(strSectionName)
Dim strBuffer
strBuffer = "<tr>" & _
"<td colspan='2' bgcolor='#eee8aa'><b><font size='3' face='Arial' color='#006400'>" & strSectionName & "</font></b>" & _
"</td>" & _
"</tr>"
Response.Write strBuffer
End Sub 'WriteSectionhHeader
'================================================= =====
'Table to display values for Fieldnames and Fieldvalues
'================================================= =====
Sub WriteRow(strFieldName, strFieldValue)
Dim strBuffer
strBuffer = "<tr>" & _
"<td align='right' >" & strFieldName & "</td>" & _
"<td>" & strFieldValue & "</td>" & _
"</tr>"
Response.Write strBuffer
End Sub 'WriteRow
%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft Visual Studio 6.0">
</head>
<body>
<center>
<font size="5" face="Arial" color="#228B22"><b>
Student Registration
</b></font>
<div>
<%
Call DisplayFormValues()
%>
<button type="Submit" name="btnReturnPage" OnClick="window.navigate('studentdata.htm')">Finished</button>
</div>
</center>
</body>
</html>
Ok so after they submit this form I want it to go to them in an email kind of for confirmation. Like the exact same form. How would I go about doing that. I know the global.asa would say something and what would go in the actual line of code itself?
|