Jesse26
asked on
fields and emails from a form
I have a form on a web page that is supposed to submit info to a database. It does that.
It is also supposed to trigger an email of its contents, it doesnt really do that. It sends the email but does not have any firlds in it. The success page only shows true in each field. I would like this page to result with the info showing from the previously filled in information and i would like that info sent to an email adddress. Here is my reslutls page code. Any suggestions?
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/Empire.a sp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.QueryString("Play erID") <> "") Then
Recordset1__MMColParam = Request.QueryString("Playe rID")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB .Recordset ")
Recordset1.ActiveConnectio n = MM_Empire_STRING
Recordset1.Source = "SELECT * FROM YouthLeague WHERE PlayerID = " + Replace(Recordset1__MMColP aram, "'", "''") + " ORDER BY PlayerID ASC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
background-color: #000000;
}
-->
</style></head>
<body>
<table width="233" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="234"><img src="Top/EmpireShadow250x2 50.gif" width="234" height="206" hspace="0" vspace="0"></td>
<td colspan="2"><object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="725" height="210">
<param name="movie" value="Top/Empirevolleybal l.swf">
<param name=quality value=high>
<param name="BGCOLOR" value="#FFFFFF">
<embed src="Top/Empirevolleyball. swf" width="725" height="210" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockw ave-flash" bgcolor="#FFFFFF"></embed>
</object></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="54" bgcolor="#990099"> </ td>
<td colspan="2" bgcolor="#000000"> </ td>
</tr>
<tr bgcolor="#FFFFFF">
<td rowspan="2" bgcolor="#990099"> </ td>
<td width="28" rowspan="2" bgcolor="#000000"><p>  ;</p>
</td>
<td width="697" height="98"><form name="form1" method="post" action=""><br>
<p><input name="FirstName" type="text" value="<%=(FirstName = Request.form("FirstName")) %>">
<br>
<input name="LastName" type="text" value="<%=( LastName = Request.form("LastName"))% >">
<br>
<input name="Address" type="text" value="<%=(Address = Request.form("Address"))%> ">
<br>
<input name="City" type="text" value="<%=(City = Request.form("City"))%>">
<br>
<input name="Zip" type="text" value="<%=(Zip = Request.form("Zip"))%>">
<br>
<input name="Phone" type="text" value="<%=(Phone = Request.form("Phone"))%>">
<br>
<input name="School" type="text" value="<%=(School = Request.form("School"))%>" >
<br>
<input name="Grade" type="text" value="<%=(Grade = Request.form("Grade"))%>">
<br>
<input name="Birthday" type="text" value="<%=(Birthdate = Request.form("Birthday"))% >">
<br>
<input name="P_FirstName" type="text" value="<%=(ParentsFirst = Request.form("P_FirstNamme "))%>">
<br>
<input name="P_LastName" type="text" value="<%=(ParentsLast = Request.form("P_LastName") )%>">
</p>
<p>
<input type="checkbox" name="Level711" value="<%=(PlayLevel = Request.form("Level711"))% >">
<br>
<input type="checkbox" name="Leve1214" value="<%=(PlayLevel = Request.form("Leve1214"))% >">
<br>
<input name="textfield" type="Gender" value="<%=(Gender = Request.form("Gender"))%>" >
<br>
<input name="textfield" type="TshirtSize" value="<%=(Tshirt = Request.form("TshirtSize") )%>">
<br>
</p><br>
<%Dim myMail, mySub, myBody, FirstName, LastName, Address, City, Zip, Phone, School, Grade, Birthday, P_FirstName, P_LastName, Level711, Leve1214, Gender, TshirtSize
mySub="Your Form Details"
myBody="Your form details - " & VbCrLF
myBody =myBody & "FirstName : " & FirstName & VbCrLF
myBody =myBody & "LastName : " & LastName & VbCrLF
myBody =myBody & "Address : " & Address & VbCrLF
myBody =myBody & "City : " & City & VbCrLF
myBody =myBody & "Zip : " & Zip & VbCrLF
myBody =myBody & "Phone : " & Phone & VbCrLF
myBody =myBody & "School : " & School & VbCrLF
myBody =myBody & "Grade : " & Grade & VbCrLF
myBody =myBody & "Birthday : " & Birthday & VbCrLF
myBody =myBody & "P_FirstNamme : " & ParentsFirst & VbCrLF
myBody =myBody & "L_FirstNamme : " & ParentsLast & VbCrLF
myBody =myBody & "Level711 : " & Level711 & VbCrLF
myBody =myBody & "Leve1214 : " & Level1214 & VbCrLF
myBody =myBody & "Gender : " & Gender & VbCrLF
myBody =myBody & "TshirtSize : " & Tshirt & VbCrLF
Set myMail=CreateObject("CDO.M essage")
myMail.Subject=mySub
myMail.From="jesse@empirev olleyball. com"
myMail.To="jesse@empirevol leyball.co m"
myMail.TextBody=myBody
myMail.Configuration.Field s.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
myMail.Configuration.Field s.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
="mail.empirevolleyball.co m"
myMail.Configuration.Field s.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
=25
myMail.Configuration.Field s.Update
myMail.Send
set myMail=nothing
%>
</form></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="88"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#000000"> </ td>
<td colspan="2" bgcolor="#000000"> </ td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#990099"> </ td>
<td colspan="2" bgcolor="#990099"> </ td>
</tr>
</table>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
It is also supposed to trigger an email of its contents, it doesnt really do that. It sends the email but does not have any firlds in it. The success page only shows true in each field. I would like this page to result with the info showing from the previously filled in information and i would like that info sent to an email adddress. Here is my reslutls page code. Any suggestions?
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/Empire.a
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.QueryString("Play
Recordset1__MMColParam = Request.QueryString("Playe
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB
Recordset1.ActiveConnectio
Recordset1.Source = "SELECT * FROM YouthLeague WHERE PlayerID = " + Replace(Recordset1__MMColP
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
background-color: #000000;
}
-->
</style></head>
<body>
<table width="233" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="234"><img src="Top/EmpireShadow250x2
<td colspan="2"><object classid="clsid:D27CDB6E-AE
<param name="movie" value="Top/Empirevolleybal
<param name=quality value=high>
<param name="BGCOLOR" value="#FFFFFF">
<embed src="Top/Empirevolleyball.
</object></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="54" bgcolor="#990099"> </
<td colspan="2" bgcolor="#000000"> </
</tr>
<tr bgcolor="#FFFFFF">
<td rowspan="2" bgcolor="#990099"> </
<td width="28" rowspan="2" bgcolor="#000000"><p> 
</td>
<td width="697" height="98"><form name="form1" method="post" action=""><br>
<p><input name="FirstName" type="text" value="<%=(FirstName = Request.form("FirstName"))
<br>
<input name="LastName" type="text" value="<%=( LastName = Request.form("LastName"))%
<br>
<input name="Address" type="text" value="<%=(Address = Request.form("Address"))%>
<br>
<input name="City" type="text" value="<%=(City = Request.form("City"))%>">
<br>
<input name="Zip" type="text" value="<%=(Zip = Request.form("Zip"))%>">
<br>
<input name="Phone" type="text" value="<%=(Phone = Request.form("Phone"))%>">
<br>
<input name="School" type="text" value="<%=(School = Request.form("School"))%>"
<br>
<input name="Grade" type="text" value="<%=(Grade = Request.form("Grade"))%>">
<br>
<input name="Birthday" type="text" value="<%=(Birthdate = Request.form("Birthday"))%
<br>
<input name="P_FirstName" type="text" value="<%=(ParentsFirst = Request.form("P_FirstNamme
<br>
<input name="P_LastName" type="text" value="<%=(ParentsLast = Request.form("P_LastName")
</p>
<p>
<input type="checkbox" name="Level711" value="<%=(PlayLevel = Request.form("Level711"))%
<br>
<input type="checkbox" name="Leve1214" value="<%=(PlayLevel = Request.form("Leve1214"))%
<br>
<input name="textfield" type="Gender" value="<%=(Gender = Request.form("Gender"))%>"
<br>
<input name="textfield" type="TshirtSize" value="<%=(Tshirt = Request.form("TshirtSize")
<br>
</p><br>
<%Dim myMail, mySub, myBody, FirstName, LastName, Address, City, Zip, Phone, School, Grade, Birthday, P_FirstName, P_LastName, Level711, Leve1214, Gender, TshirtSize
mySub="Your Form Details"
myBody="Your form details - " & VbCrLF
myBody =myBody & "FirstName : " & FirstName & VbCrLF
myBody =myBody & "LastName : " & LastName & VbCrLF
myBody =myBody & "Address : " & Address & VbCrLF
myBody =myBody & "City : " & City & VbCrLF
myBody =myBody & "Zip : " & Zip & VbCrLF
myBody =myBody & "Phone : " & Phone & VbCrLF
myBody =myBody & "School : " & School & VbCrLF
myBody =myBody & "Grade : " & Grade & VbCrLF
myBody =myBody & "Birthday : " & Birthday & VbCrLF
myBody =myBody & "P_FirstNamme : " & ParentsFirst & VbCrLF
myBody =myBody & "L_FirstNamme : " & ParentsLast & VbCrLF
myBody =myBody & "Level711 : " & Level711 & VbCrLF
myBody =myBody & "Leve1214 : " & Level1214 & VbCrLF
myBody =myBody & "Gender : " & Gender & VbCrLF
myBody =myBody & "TshirtSize : " & Tshirt & VbCrLF
Set myMail=CreateObject("CDO.M
myMail.Subject=mySub
myMail.From="jesse@empirev
myMail.To="jesse@empirevol
myMail.TextBody=myBody
myMail.Configuration.Field
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
myMail.Configuration.Field
("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
="mail.empirevolleyball.co
myMail.Configuration.Field
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
=25
myMail.Configuration.Field
myMail.Send
set myMail=nothing
%>
</form></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="88"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#000000"> </
<td colspan="2" bgcolor="#000000"> </
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#990099"> </
<td colspan="2" bgcolor="#990099"> </
</tr>
</table>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
ASKER
Thanx rouchie i stll get an email and i still get no info in the email, Now however instead of getting true in all my fields they result as blank. I believe i did as you asked, here is the code again
Please let me know if i can give you any further info to better aid you aid me
here is also te two pages i am working on
submit page-http://empirevolleyball.com/Junior.asp
and
confirmation page http://empirevolleyball.com/JuniorSuccess.asp
-#include file="Connections/Empire.a sp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.QueryString("Play erID") <> "") Then
Recordset1__MMColParam = Request.QueryString("Playe rID")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB .Recordset ")
Recordset1.ActiveConnectio n = MM_Empire_STRING
Recordset1.Source = "SELECT * FROM YouthLeague WHERE PlayerID = " + Replace(Recordset1__MMColP aram, "'", "''") + " ORDER BY PlayerID ASC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
background-color: #000000;
}
-->
</style></head>
<body>
<table width="233" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="234"><img src="Top/EmpireShadow250x2 50.gif" width="234" height="206" hspace="0" vspace="0"></td>
<td colspan="2"><object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="725" height="210">
<param name="movie" value="Top/Empirevolleybal l.swf">
<param name=quality value=high>
<param name="BGCOLOR" value="#FFFFFF">
<embed src="Top/Empirevolleyball. swf" width="725" height="210" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockw ave-flash" bgcolor="#FFFFFF"></embed>
</object></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="54" bgcolor="#990099"> </ td>
<td colspan="2" bgcolor="#000000"> </ td>
</tr>
<tr bgcolor="#FFFFFF">
<td rowspan="2" bgcolor="#990099"> </ td>
<td width="28" rowspan="2" bgcolor="#000000"><p>  ;</p>
</td>
<td width="697" height="98"><form name="form1" method="post" action=""><br>
<p><input name="FirstName" type="text" value="<%=(Request.form("F irstName") )%>">
<br>
<input name="LastName" type="text" value="<%=(Request.form("L astName")) %>">
<br>
<input name="Address" type="text" value="<%=(Request.form("A ddress"))% >">
<br>
<input name="City" type="text" value="<%=(Request.form("C ity"))%>">
<br>
<input name="Zip" type="text" value="<%=(Request.form("Z ip"))%>">
<br>
<input name="Phone" type="text" value="<%=(Request.form("P hone"))%>" >
<br>
<input name="School" type="text" value="<%=(Request.form("S chool"))%> ">
<br>
<input name="Grade" type="text" value="<%=(Request.form("G rade"))%>" >
<br>
<input name="Birthday" type="text" value="<%=(Request.form("B irthday")) %>">
<br>
<input name="P_FirstName" type="text" value="<%=(Request.form("P _FirstName "))%>">
<br>
<input name="P_LastName" type="text" value="<%=(Request.form("P _LastName" ))%>">
</p>
<p>
<input type="checkbox" name="Level711" value="<%=(Request.form("L evel711")) %>">
<br>
<input type="checkbox" name="Leve1214" value="<%=(Request.form("L eve1214")) %>">
<br>
<input name="textfield" type="Gender" value="<%=(Request.form("G ender"))%> ">
<br>
<input name="textfield" type="TshirtSize" value="<%=(Request.form("T shirtSize" ))%>">
<br>
</p><br>
<%Dim myMail, mySub, myBody, FirstName, LastName, Address, City, Zip, Phone, School, Grade, Birthday, P_FirstName, P_LastName, Level711, Leve1214, Gender, TshirtSize
FirstName = Request.form("FirstName")
LastName = Request.form("LastName")
Address = Request.form("Address")
City = Request.form("City")
Zip = Request.form("Zip")
Phone = Request.form("Phone")
School = Request.form("School")
Grade = Request.form("Grade")
Birthdate = Request.form("Birthday")
ParentsFirst = Request.form("P_FirstNamme ")
ParentsLast = Request.form("P_LastName")
PlayLevel = Request.form("Level711")
PlayLevel = Request.form("Leve1214")
Gender = Request.form("Gender")
Tshirt = Request.form("TshirtSize")
mySub="Your Form Details"
myBody="Your form details - " & VbCrLF
myBody =myBody & "FirstName : " & request.form("FirstName") & VbCrLF
myBody =myBody & "LastName : " & request.form("LastName") & VbCrLF
myBody =myBody & "Address : " & request.form("Address") & VbCrLF
myBody =myBody & "City : " & request.form("City") & VbCrLF
myBody =myBody & "Zip : " & request.form("Zip") & VbCrLF
myBody =myBody & "Phone : " & request.form("Phone") & VbCrLF
myBody =myBody & "School : " & request.form("School") & VbCrLF
myBody =myBody & "Grade : " & request.form("Grade") & VbCrLF
myBody =myBody & "Birthday : " & request.form("Birthday") & VbCrLF
myBody =myBody & "P_FirstNamme : " & request.form("P_FirstName" ) & VbCrLF
myBody =myBody & "L_FirstNamme : " & request.form("P_LastName") & VbCrLF
myBody =myBody & "Level711 : " & request.form("Level711") & VbCrLF
myBody =myBody & "Leve1214 : " & request.form("Leve1214") & VbCrLF
myBody =myBody & "Gender : " & request.form("Gender") & VbCrLF
myBody =myBody & "TshirtSize : " & request.form("TshirtSize") & VbCrLF
Set myMail=CreateObject("CDO.M essage")
myMail.Subject=mySub
myMail.From="jesse@empirev olleyball. com"
myMail.To="jesse@empirevol leyball.co m"
myMail.TextBody=myBody
myMail.Configuration.Field s.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
myMail.Configuration.Field s.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
="mail.empirevolleyball.co m"
myMail.Configuration.Field s.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
=25
myMail.Configuration.Field s.Update
myMail.Send
set myMail=nothing
%>
</form></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="88"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#000000"> </ td>
<td colspan="2" bgcolor="#000000"> </ td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#990099"> </ td>
<td colspan="2" bgcolor="#990099"> </ td>
</tr>
</table>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
Please let me know if i can give you any further info to better aid you aid me
here is also te two pages i am working on
submit page-http://empirevolleyball.com/Junior.asp
and
confirmation page http://empirevolleyball.com/JuniorSuccess.asp
-#include file="Connections/Empire.a
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.QueryString("Play
Recordset1__MMColParam = Request.QueryString("Playe
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB
Recordset1.ActiveConnectio
Recordset1.Source = "SELECT * FROM YouthLeague WHERE PlayerID = " + Replace(Recordset1__MMColP
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
background-color: #000000;
}
-->
</style></head>
<body>
<table width="233" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="234"><img src="Top/EmpireShadow250x2
<td colspan="2"><object classid="clsid:D27CDB6E-AE
<param name="movie" value="Top/Empirevolleybal
<param name=quality value=high>
<param name="BGCOLOR" value="#FFFFFF">
<embed src="Top/Empirevolleyball.
</object></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="54" bgcolor="#990099"> </
<td colspan="2" bgcolor="#000000"> </
</tr>
<tr bgcolor="#FFFFFF">
<td rowspan="2" bgcolor="#990099"> </
<td width="28" rowspan="2" bgcolor="#000000"><p> 
</td>
<td width="697" height="98"><form name="form1" method="post" action=""><br>
<p><input name="FirstName" type="text" value="<%=(Request.form("F
<br>
<input name="LastName" type="text" value="<%=(Request.form("L
<br>
<input name="Address" type="text" value="<%=(Request.form("A
<br>
<input name="City" type="text" value="<%=(Request.form("C
<br>
<input name="Zip" type="text" value="<%=(Request.form("Z
<br>
<input name="Phone" type="text" value="<%=(Request.form("P
<br>
<input name="School" type="text" value="<%=(Request.form("S
<br>
<input name="Grade" type="text" value="<%=(Request.form("G
<br>
<input name="Birthday" type="text" value="<%=(Request.form("B
<br>
<input name="P_FirstName" type="text" value="<%=(Request.form("P
<br>
<input name="P_LastName" type="text" value="<%=(Request.form("P
</p>
<p>
<input type="checkbox" name="Level711" value="<%=(Request.form("L
<br>
<input type="checkbox" name="Leve1214" value="<%=(Request.form("L
<br>
<input name="textfield" type="Gender" value="<%=(Request.form("G
<br>
<input name="textfield" type="TshirtSize" value="<%=(Request.form("T
<br>
</p><br>
<%Dim myMail, mySub, myBody, FirstName, LastName, Address, City, Zip, Phone, School, Grade, Birthday, P_FirstName, P_LastName, Level711, Leve1214, Gender, TshirtSize
FirstName = Request.form("FirstName")
LastName = Request.form("LastName")
Address = Request.form("Address")
City = Request.form("City")
Zip = Request.form("Zip")
Phone = Request.form("Phone")
School = Request.form("School")
Grade = Request.form("Grade")
Birthdate = Request.form("Birthday")
ParentsFirst = Request.form("P_FirstNamme
ParentsLast = Request.form("P_LastName")
PlayLevel = Request.form("Level711")
PlayLevel = Request.form("Leve1214")
Gender = Request.form("Gender")
Tshirt = Request.form("TshirtSize")
mySub="Your Form Details"
myBody="Your form details - " & VbCrLF
myBody =myBody & "FirstName : " & request.form("FirstName") & VbCrLF
myBody =myBody & "LastName : " & request.form("LastName") & VbCrLF
myBody =myBody & "Address : " & request.form("Address") & VbCrLF
myBody =myBody & "City : " & request.form("City") & VbCrLF
myBody =myBody & "Zip : " & request.form("Zip") & VbCrLF
myBody =myBody & "Phone : " & request.form("Phone") & VbCrLF
myBody =myBody & "School : " & request.form("School") & VbCrLF
myBody =myBody & "Grade : " & request.form("Grade") & VbCrLF
myBody =myBody & "Birthday : " & request.form("Birthday") & VbCrLF
myBody =myBody & "P_FirstNamme : " & request.form("P_FirstName"
myBody =myBody & "L_FirstNamme : " & request.form("P_LastName")
myBody =myBody & "Level711 : " & request.form("Level711") & VbCrLF
myBody =myBody & "Leve1214 : " & request.form("Leve1214") & VbCrLF
myBody =myBody & "Gender : " & request.form("Gender") & VbCrLF
myBody =myBody & "TshirtSize : " & request.form("TshirtSize")
Set myMail=CreateObject("CDO.M
myMail.Subject=mySub
myMail.From="jesse@empirev
myMail.To="jesse@empirevol
myMail.TextBody=myBody
myMail.Configuration.Field
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
myMail.Configuration.Field
("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
="mail.empirevolleyball.co
myMail.Configuration.Field
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
=25
myMail.Configuration.Field
myMail.Send
set myMail=nothing
%>
</form></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="88"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#000000"> </
<td colspan="2" bgcolor="#000000"> </
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#990099"> </
<td colspan="2" bgcolor="#990099"> </
</tr>
</table>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
Which page does that code come from?
Just to follow, if the page is JuniorSuccess.asp, what is the purpose of the database SELECT statement that is in there?
ASKER
Well i am trying to have the data filled out in the previos form showing on the following page. I just also thought i put texfields in the JuniorSuccess.asp page and dropped recordsets in each of them. I dont think i need the fields just the recordsets. I dont think this is the solution, can you confirm my thoughts, as well is there a better way to get this info showing up?
ASKER
Sorry as well this page comes from a page called http://empirevolleyball.com/Junior.asp, didnt see the other response you gave rouchhie thanks
ASKER
ok at this point I no longer need the fields that they just filled in to show up on the results page, I just need the page to send the email of the fields filled out in the previous form to show up in the email. I get an email message that looks like this
Your form details -
FirstName :
LastName :
Address :
City :
Zip :
Phone :
School :
Grade :
Birthday :
P_FirstNamme :
L_FirstNamme :
Level711 :
Leve1214 :
Gender :
TshirtSize :
Your form details -
FirstName :
LastName :
Address :
City :
Zip :
Phone :
School :
Grade :
Birthday :
P_FirstNamme :
L_FirstNamme :
Level711 :
Leve1214 :
Gender :
TshirtSize :
Okay can you post the code for your page you described above?
ASKER
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/Empire.a sp" -->
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB .Recordset ")
Recordset1.ActiveConnectio n = MM_Empire_STRING
Recordset1.Source = "SELECT * FROM YouthLeague"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Empire Volleyball</title>
<style type="text/css">
<!--
body {
background-color: #000000;
}
.style1 {font-family: "Copperplate Gothic Bold"}
.style3 {font-family: "Copperplate Gothic Bold"; color: #00CCFF; }
.style5 {font-family: "Copperplate Gothic Bold"; color: #990099; }
.style7 {font-size: 24px}
-->
</style></head>
<body>
<table width="233" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="234"><img src="Top/EmpireShadow250x2 50.gif" width="234" height="206" hspace="0" vspace="0"></td>
<td colspan="2"><object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="725" height="210">
<param name="movie" value="Top/Empirevolleybal l.swf">
<param name=quality value=high>
<param name="BGCOLOR" value="#FFFFFF">
<embed src="Top/Empirevolleyball. swf" width="725" height="210" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockw ave-flash" bgcolor="#FFFFFF"></embed>
</object></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="54" bgcolor="#990099"> </ td>
<td colspan="2" bgcolor="#000000"><object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="970" height="414" style="position: absolute; top: 225px; left: 5px; z-index:1; visibility: visible;" >
<param name="movie" value="Menu/empiretop_nav. swf" />
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="transparent" />
<embed src="Menu/empiretop_nav.sw f" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockw ave-flash" width="970" height="414" allowScriptAccess="always" wmode="transparent"></embe d>
</object></td>
</tr>
<tr bgcolor="#FFFFFF">
<td rowspan="5" bgcolor="#990099"> </ td>
<td width="28" rowspan="5" bgcolor="#000000"><p>
<object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="517" height="328" style="position: absolute; top: 271px; left: 10px; z-index:1; visibility: visible;" >
<param name="movie" value="Menu/empireleft_nav .swf" />
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="transparent" />
<embed src="Menu/empireleft_nav.s wf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockw ave-flash" width="517" height="328" allowScriptAccess="always" wmode="transparent"></embe d>
</object>
</p>
</td>
<td width="697" height="73"><form name="form1" method="post" action="">
<p align="center"> <span class="style1"><br>
<span class="style7">You have successfully signed up for <br>
Empire's Junior Youth League.</span></span></p>
<%Dim myMail, mySub, myBody, FirstName, LastName, Address, City, Zip, Phone, School, Grade, Birthday, P_FirstName, P_LastName, Level711, Leve1214, Gender, TshirtSize
FirstName = Request.form("FirstName")
LastName = Request.form("LastName")
Address = Request.form("Address")
City = Request.form("City")
Zip = Request.form("Zip")
Phone = Request.form("Phone")
School = Request.form("School")
Grade = Request.form("Grade")
Birthdate = Request.form("Birthday")
ParentsFirst = Request.form("P_FirstNamme ")
ParentsLast = Request.form("P_LastName")
PlayLevel = Request.form("Level711")
PlayLevel = Request.form("Leve1214")
Gender = Request.form("Gender")
Tshirt = Request.form("TshirtSize")
mySub="Your Form Details"
myBody="Your form details - " & VbCrLF
myBody =myBody & "FirstName : " & request.form("FirstName") & VbCrLF
myBody =myBody & "LastName : " & request.form("LastName") & VbCrLF
myBody =myBody & "Address : " & request.form("Address") & VbCrLF
myBody =myBody & "City : " & request.form("City") & VbCrLF
myBody =myBody & "Zip : " & request.form("Zip") & VbCrLF
myBody =myBody & "Phone : " & request.form("Phone") & VbCrLF
myBody =myBody & "School : " & request.form("School") & VbCrLF
myBody =myBody & "Grade : " & request.form("Grade") & VbCrLF
myBody =myBody & "Birthday : " & request.form("Birthday") & VbCrLF
myBody =myBody & "P_FirstNamme : " & request.form("P_FirstName" ) & VbCrLF
myBody =myBody & "L_FirstNamme : " & request.form("P_LastName") & VbCrLF
myBody =myBody & "Level711 : " & request.form("Level711") & VbCrLF
myBody =myBody & "Leve1214 : " & request.form("Leve1214") & VbCrLF
myBody =myBody & "Gender : " & request.form("Gender") & VbCrLF
myBody =myBody & "TshirtSize : " & request.form("TshirtSize") & VbCrLF
Set myMail=CreateObject("CDO.M essage")
myMail.Subject=mySub
myMail.From="Kathy@empirev olleyball. com"
myMail.To="Kathy@empirevol leyball.co m"
myMail.TextBody=myBody
myMail.Configuration.Field s.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
myMail.Configuration.Field s.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
="mail.empirevolleyball.co m"
myMail.Configuration.Field s.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
=25
myMail.Configuration.Field s.Update
myMail.Send
set myMail=nothing
%>
</form></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="37"><div align="center"> <span class="style1">Two levels will be offered for each session.</span><br>
</div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="72"><div align="center"><span class="style1"> Level One: Ages 7-11 & <br>
Level Two: Ages 12-14<br>
<br>
</span></div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="98" bgcolor="#000000"><div align="center">
<p class="style3"><span class="style1"><br>
<span class="style5">Sign-ups and opening clinic</span><br>
Friday, April 20</span><br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 1: Friday, May 4<br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 2: Friday, May 11<br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 3: Friday, May 18<br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 4: Friday, May 25<br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 5: Friday, June 1<br>
5-7 pm Sonoma State University main gym</p>
<p class="style3">Session 6: Friday, June 8<br>
5-7 pm Sonoma State University main gym </p>
</div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="19"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#000000"> </ td>
<td colspan="2" bgcolor="#000000"> </ td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#990099"> </ td>
<td colspan="2" bgcolor="#990099"> </ td>
</tr>
</table>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<!--#include file="Connections/Empire.a
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB
Recordset1.ActiveConnectio
Recordset1.Source = "SELECT * FROM YouthLeague"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Empire Volleyball</title>
<style type="text/css">
<!--
body {
background-color: #000000;
}
.style1 {font-family: "Copperplate Gothic Bold"}
.style3 {font-family: "Copperplate Gothic Bold"; color: #00CCFF; }
.style5 {font-family: "Copperplate Gothic Bold"; color: #990099; }
.style7 {font-size: 24px}
-->
</style></head>
<body>
<table width="233" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="234"><img src="Top/EmpireShadow250x2
<td colspan="2"><object classid="clsid:D27CDB6E-AE
<param name="movie" value="Top/Empirevolleybal
<param name=quality value=high>
<param name="BGCOLOR" value="#FFFFFF">
<embed src="Top/Empirevolleyball.
</object></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="54" bgcolor="#990099"> </
<td colspan="2" bgcolor="#000000"><object classid="clsid:D27CDB6E-AE
<param name="movie" value="Menu/empiretop_nav.
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="transparent" />
<embed src="Menu/empiretop_nav.sw
</object></td>
</tr>
<tr bgcolor="#FFFFFF">
<td rowspan="5" bgcolor="#990099"> </
<td width="28" rowspan="5" bgcolor="#000000"><p>
<object classid="clsid:D27CDB6E-AE
<param name="movie" value="Menu/empireleft_nav
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="transparent" />
<embed src="Menu/empireleft_nav.s
</object>
</p>
</td>
<td width="697" height="73"><form name="form1" method="post" action="">
<p align="center"> <span class="style1"><br>
<span class="style7">You have successfully signed up for <br>
Empire's Junior Youth League.</span></span></p>
<%Dim myMail, mySub, myBody, FirstName, LastName, Address, City, Zip, Phone, School, Grade, Birthday, P_FirstName, P_LastName, Level711, Leve1214, Gender, TshirtSize
FirstName = Request.form("FirstName")
LastName = Request.form("LastName")
Address = Request.form("Address")
City = Request.form("City")
Zip = Request.form("Zip")
Phone = Request.form("Phone")
School = Request.form("School")
Grade = Request.form("Grade")
Birthdate = Request.form("Birthday")
ParentsFirst = Request.form("P_FirstNamme
ParentsLast = Request.form("P_LastName")
PlayLevel = Request.form("Level711")
PlayLevel = Request.form("Leve1214")
Gender = Request.form("Gender")
Tshirt = Request.form("TshirtSize")
mySub="Your Form Details"
myBody="Your form details - " & VbCrLF
myBody =myBody & "FirstName : " & request.form("FirstName") & VbCrLF
myBody =myBody & "LastName : " & request.form("LastName") & VbCrLF
myBody =myBody & "Address : " & request.form("Address") & VbCrLF
myBody =myBody & "City : " & request.form("City") & VbCrLF
myBody =myBody & "Zip : " & request.form("Zip") & VbCrLF
myBody =myBody & "Phone : " & request.form("Phone") & VbCrLF
myBody =myBody & "School : " & request.form("School") & VbCrLF
myBody =myBody & "Grade : " & request.form("Grade") & VbCrLF
myBody =myBody & "Birthday : " & request.form("Birthday") & VbCrLF
myBody =myBody & "P_FirstNamme : " & request.form("P_FirstName"
myBody =myBody & "L_FirstNamme : " & request.form("P_LastName")
myBody =myBody & "Level711 : " & request.form("Level711") & VbCrLF
myBody =myBody & "Leve1214 : " & request.form("Leve1214") & VbCrLF
myBody =myBody & "Gender : " & request.form("Gender") & VbCrLF
myBody =myBody & "TshirtSize : " & request.form("TshirtSize")
Set myMail=CreateObject("CDO.M
myMail.Subject=mySub
myMail.From="Kathy@empirev
myMail.To="Kathy@empirevol
myMail.TextBody=myBody
myMail.Configuration.Field
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
myMail.Configuration.Field
("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
="mail.empirevolleyball.co
myMail.Configuration.Field
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
=25
myMail.Configuration.Field
myMail.Send
set myMail=nothing
%>
</form></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="37"><div align="center"> <span class="style1">Two levels will be offered for each session.</span><br>
</div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="72"><div align="center"><span class="style1"> Level One: Ages 7-11 & <br>
Level Two: Ages 12-14<br>
<br>
</span></div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="98" bgcolor="#000000"><div align="center">
<p class="style3"><span class="style1"><br>
<span class="style5">Sign-ups and opening clinic</span><br>
Friday, April 20</span><br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 1: Friday, May 4<br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 2: Friday, May 11<br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 3: Friday, May 18<br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 4: Friday, May 25<br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 5: Friday, June 1<br>
5-7 pm Sonoma State University main gym</p>
<p class="style3">Session 6: Friday, June 8<br>
5-7 pm Sonoma State University main gym </p>
</div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="19"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#000000"> </
<td colspan="2" bgcolor="#000000"> </
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#990099"> </
<td colspan="2" bgcolor="#990099"> </
</tr>
</table>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
Okay the problem is that the values are not posting from JUNIOR.ASP through to JUNIORSUCCESS.ASP
Instead DW has written JUNIOR.ASP to post the values back to the SAME PAGE. What happens is this:
1. person fills out form on junior.asp
2. person submits form back to junior.asp
3. junior.asp does the database work
4. person is bounced onto juniorsuccess.asp
5. juniorsuccess.asp fails because no data was posted to it
What you will have to do is place the code to insert the record into juniorsuccess.asp and remove it from junior.asp. Juniorsuccess.asp can then also send the email as it will have access to the posted data.
Instead DW has written JUNIOR.ASP to post the values back to the SAME PAGE. What happens is this:
1. person fills out form on junior.asp
2. person submits form back to junior.asp
3. junior.asp does the database work
4. person is bounced onto juniorsuccess.asp
5. juniorsuccess.asp fails because no data was posted to it
What you will have to do is place the code to insert the record into juniorsuccess.asp and remove it from junior.asp. Juniorsuccess.asp can then also send the email as it will have access to the posted data.
ASKER
ok can you help ma with how much of the code on the first page is needed Here is the code of the original page
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/Empire.a sp" -->
<%
' *** Edit Operations: declare variables
Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd
Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId
Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i
MM_editAction = CStr(Request.ServerVariabl es("SCRIPT _NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request. QueryStrin g)
End If
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables
If (CStr(Request("MM_insert") ) = "form1") Then
MM_editConnection = MM_Empire_STRING
MM_editTable = "YouthLeague"
MM_editRedirectUrl = "/JuniorSuccess.asp"
MM_fieldsStr = "FirstName|value|LastName| value|Addr ess|value| City|value |Zip|value |Phone|val ue|School| value|Grad e|value|Bi rthday|val ue|P_First Name|value |P_LastNam e|value|Le vel711|val ue|Leve121 4|value|Ge nder|value |TshirtSiz e|value"
MM_columnsStr = "FirstName|',none,''|LastN ame|',none ,''|Addres s|',none,' '|City|',n one,''|Zip |',none,'' |Phone|',n one,''|Sch ool|',none ,''|Grade| ',none,''| Birthday|' ,none,''|P _FirstName |',none,'' |P_LastNam e|',none,' '|Level711 |none,1,0| Leve1214|n one,1,0|Ge nder|',non e,''|Tshir tSize|',no ne,''"
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")
' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_field s(MM_i)))
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it
Dim MM_tableValues
Dim MM_dbValues
If (CStr(Request("MM_insert") ) <> "") Then
' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1)," ,")
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","'' ") & "'"
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End If
MM_tableValues = MM_tableValues & MM_columns(MM_i)
MM_dbValues = MM_dbValues & MM_formVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"
If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB .Command")
MM_editCmd.ActiveConnectio n = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnectio n.Close
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editR edirectUrl )
End If
End If
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB .Recordset ")
Recordset1.ActiveConnectio n = MM_Empire_STRING
Recordset1.Source = "SELECT * FROM YouthLeague"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Empire Volleyball</title>
<style type="text/css">
<!--
body {
background-color: #080808;
}
-->
</style></head>
<body>
<table width="233" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#FFFFFF"><img src="Top/EmpireShadow250x2 50.gif" width="234" height="206" hspace="0" vspace="0" align="top"></td>
<td colspan="4"><object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="725" height="210">
<param name="movie" value="Top/Empirevolleybal l.swf">
<param name=quality value=high>
<param name="BGCOLOR" value="#FFFFFF">
<embed src="Top/Empirevolleyball. swf" width="725" height="210" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockw ave-flash" bgcolor="#FFFFFF"></embed>
</object></td>
</tr>
<tr>
<td height="78" bgcolor="#990099"><object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="970" height="414" style="position: absolute; top: 225px; left: 5px; z-index:1; visibility: visible;" >
<param name="movie" value="Menu/empiretop_nav. swf" />
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="transparent" />
<embed src="Menu/empiretop_nav.sw f" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockw ave-flash" width="970" height="414" allowScriptAccess="always" wmode="transparent"></embe d>
</object></td>
<td colspan="4" bgcolor="#080808"> </ td>
</tr>
<tr>
<td bgcolor="#990099"> </ td>
<td colspan="4" bgcolor="#FFFFFF">
<form method="POST" action="<%=MM_editAction%> " name="form1">
<table align="center">
<tr valign="baseline">
<td nowrap align="right">First Name:</td>
<td><input type="text" name="FirstName" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Last Name:</td>
<td><input type="text" name="LastName" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Address:</td >
<td><input type="text" name="Address" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">City:</td>
<td><input type="text" name="City" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Zip:</td>
<td><input type="text" name="Zip" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Phone:</td>
<td><input type="text" name="Phone" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">School:</td>
<td><input type="text" name="School" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Grade:</td>
<td><input type="text" name="Grade" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Birthday:</t d>
<td><input type="text" name="Birthday" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Parents First Name:</td>
<td><input type="text" name="P_FirstName" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Parents Last Name:</td>
<td><input type="text" name="P_LastName" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Ages 7 to 11:</td>
<td><input type="checkbox" name="Level711" value=1 >
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Ages 11 to 14:</td>
<td><input type="checkbox" name="Leve1214" value=1 >
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Gender:</td>
<td><input type="text" name="Gender" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">T- Shirt Size:</td>
<td><input type="text" name="TshirtSize" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right"> </td>
<td><input type="submit" value="Insert Participant">
</td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1">
</form>
<p> </p></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr bgcolor="#990099">
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="517" height="328" style="position: absolute; top: 271px; left: 10px; z-index:1; visibility: visible;" >
<param name="movie" value="Menu/empireleft_nav .swf" />
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="transparent" />
<embed src="Menu/empireleft_nav.s wf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockw ave-flash" width="517" height="328" allowScriptAccess="always" wmode="transparent"></embe d>
</object>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/Empire.a
<%
' *** Edit Operations: declare variables
Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd
Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId
Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i
MM_editAction = CStr(Request.ServerVariabl
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.
End If
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables
If (CStr(Request("MM_insert")
MM_editConnection = MM_Empire_STRING
MM_editTable = "YouthLeague"
MM_editRedirectUrl = "/JuniorSuccess.asp"
MM_fieldsStr = "FirstName|value|LastName|
MM_columnsStr = "FirstName|',none,''|LastN
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")
' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_field
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it
Dim MM_tableValues
Dim MM_dbValues
If (CStr(Request("MM_insert")
' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),"
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End If
MM_tableValues = MM_tableValues & MM_columns(MM_i)
MM_dbValues = MM_dbValues & MM_formVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"
If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB
MM_editCmd.ActiveConnectio
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnectio
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editR
End If
End If
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB
Recordset1.ActiveConnectio
Recordset1.Source = "SELECT * FROM YouthLeague"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Empire Volleyball</title>
<style type="text/css">
<!--
body {
background-color: #080808;
}
-->
</style></head>
<body>
<table width="233" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#FFFFFF"><img src="Top/EmpireShadow250x2
<td colspan="4"><object classid="clsid:D27CDB6E-AE
<param name="movie" value="Top/Empirevolleybal
<param name=quality value=high>
<param name="BGCOLOR" value="#FFFFFF">
<embed src="Top/Empirevolleyball.
</object></td>
</tr>
<tr>
<td height="78" bgcolor="#990099"><object classid="clsid:D27CDB6E-AE
<param name="movie" value="Menu/empiretop_nav.
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="transparent" />
<embed src="Menu/empiretop_nav.sw
</object></td>
<td colspan="4" bgcolor="#080808"> </
</tr>
<tr>
<td bgcolor="#990099"> </
<td colspan="4" bgcolor="#FFFFFF">
<form method="POST" action="<%=MM_editAction%>
<table align="center">
<tr valign="baseline">
<td nowrap align="right">First Name:</td>
<td><input type="text" name="FirstName" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Last Name:</td>
<td><input type="text" name="LastName" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Address:</td
<td><input type="text" name="Address" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">City:</td>
<td><input type="text" name="City" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Zip:</td>
<td><input type="text" name="Zip" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Phone:</td>
<td><input type="text" name="Phone" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">School:</td>
<td><input type="text" name="School" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Grade:</td>
<td><input type="text" name="Grade" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Birthday:</t
<td><input type="text" name="Birthday" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Parents First Name:</td>
<td><input type="text" name="P_FirstName" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Parents Last Name:</td>
<td><input type="text" name="P_LastName" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Ages 7 to 11:</td>
<td><input type="checkbox" name="Level711" value=1 >
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Ages 11 to 14:</td>
<td><input type="checkbox" name="Leve1214" value=1 >
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Gender:</td>
<td><input type="text" name="Gender" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">T- Shirt Size:</td>
<td><input type="text" name="TshirtSize" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right"> </td>
<td><input type="submit" value="Insert Participant">
</td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1">
</form>
<p> </p></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr bgcolor="#990099">
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<object classid="clsid:D27CDB6E-AE
<param name="movie" value="Menu/empireleft_nav
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="transparent" />
<embed src="Menu/empireleft_nav.s
</object>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
Okay there's some things you must understand. First, what you are asking for is beyond the power of DW to deliver for you. Because you want to do 2 things on 1 page (save a record AND send email) - you HAVE to learn how to do this yourself. Don't worry it's not too hard, and is worth it! Don't be scared!
Based on the above I have tried to rewrite the 2 pages. Therefore DW might now kick up problem saying it can't do certain stuff. This is because I have removed DW's code because it is not user friendly and is way over-complex.
Now I can't test this page out because I don't have the database, so there might be some slight ASP errors to fix before it works correctly. Please don't try to fix them yourself because then my copy of the file will end up being different to yours - creating more problems! Just post the error you see on-screen and I'll address them from my copy!
Okay here are the files:
*** JUNIOR.ASP ************************** ********** ********** ********** ********** ********** ********** ********** ****
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Empire Volleyball</title>
<style type="text/css">
<!--
body {background-color: #080808;}
-->
</style></head>
<body>
<table width="233" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#FFFFFF"><img src="Top/EmpireShadow250x2 50.gif" width="234" height="206" hspace="0" vspace="0" align="top"></td>
<td colspan="4"><object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="725" height="210">
<param name="movie" value="Top/Empirevolleybal l.swf">
<param name=quality value=high>
<param name="BGCOLOR" value="#FFFFFF">
<embed src="Top/Empirevolleyball. swf" width="725" height="210" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockw ave-flash" bgcolor="#FFFFFF"></embed>
</object></td>
</tr>
<tr>
<td height="78" bgcolor="#990099"><object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="970" height="414" style="position: absolute; top: 225px; left: 5px; z-index:1; visibility: visible;" >
<param name="movie" value="Menu/empiretop_nav. swf" />
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="transparent" />
<embed src="Menu/empiretop_nav.sw f" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockw ave-flash" width="970" height="414" allowScriptAccess="always" wmode="transparent"></embe d>
</object></td>
<td colspan="4" bgcolor="#080808"> </ td>
</tr>
<tr>
<td bgcolor="#990099"> </ td>
<td colspan="4" bgcolor="#FFFFFF">
<form method="POST" action="juniorsuccess.asp" name="form1">
<table align="center">
<tr valign="baseline">
<td nowrap align="right">First Name:</td>
<td><input type="text" name="FirstName" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Last Name:</td>
<td><input type="text" name="LastName" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Address:</td >
<td><input type="text" name="Address" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">City:</td>
<td><input type="text" name="City" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Zip:</td>
<td><input type="text" name="Zip" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Phone:</td>
<td><input type="text" name="Phone" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">School:</td>
<td><input type="text" name="School" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Grade:</td>
<td><input type="text" name="Grade" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Birthday:</t d>
<td><input type="text" name="Birthday" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Parents First Name:</td>
<td><input type="text" name="P_FirstName" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Parents Last Name:</td>
<td><input type="text" name="P_LastName" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Ages 7 to 11:</td>
<td><input type="checkbox" name="Level711" value=1 >
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Ages 11 to 14:</td>
<td><input type="checkbox" name="Leve1214" value=1 >
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Gender:</td>
<td><input type="text" name="Gender" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">T- Shirt Size:</td>
<td><input type="text" name="TshirtSize" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right"> </td>
<td><input type="submit" value="Insert Participant">
</td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1">
</form>
<p> </p></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr bgcolor="#990099">
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="517" height="328" style="position: absolute; top: 271px; left: 10px; z-index:1; visibility: visible;" >
<param name="movie" value="Menu/empireleft_nav .swf" />
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="transparent" />
<embed src="Menu/empireleft_nav.s wf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockw ave-flash" width="517" height="328" allowScriptAccess="always" wmode="transparent"></embe d>
</object>
</body>
</html>
************************** ********** ********** ********** ********** ********** ********** ********** ********** ********** ***
*** JUNIORSUCCESS.ASP ************************** ********** ********** ********** ********** ********** ********** *
<%@ language="VBSCRIPT" codepage="1252" %>
<!--#include file="Connections/Empire.a sp" -->
<%
' -------------------------- ---------- ---------- ---------- ---------- ---------- ---------- -
' 1 - INSERT THE NEW RECORD
Dim myCommandText, editCommand
myCommandText = "INSERT INTO YouthLeague ("
myCommandText = myCommandText & "FirstName, "
myCommandText = myCommandText & "LastName ,"
myCommandText = myCommandText & "Address, "
myCommandText = myCommandText & "City, "
myCommandText = myCommandText & "Zip, "
myCommandText = myCommandText & "Phone,"
myCommandText = myCommandText & "School, "
myCommandText = myCommandText & "Grade "
myCommandText = myCommandText & "Birthday, "
myCommandText = myCommandText & "P_FirstName, "
myCommandText = myCommandText & "P_LastName, "
myCommandText = myCommandText & "Level711, "
myCommandText = myCommandText & "Leve1214, "
myCommandText = myCommandText & "Gender, "
myCommandText = myCommandText & "TshirtSize"
myCommandText = myCommandText & ")"
myCommandText = myCommandText & " VALUES "
myCommandText = myCommandText & "("
myCommandText = myCommandText & replace(request.Form("Firs tName"),"' ","''") & ", "
myCommandText = myCommandText & replace(request.Form("Last Name"),"'" ,"''") & ", "
myCommandText = myCommandText & replace(request.Form("Addr ess"),"'", "''") & ", "
myCommandText = myCommandText & replace(request.Form("City "),"'","'' ") & ", "
myCommandText = myCommandText & replace(request.Form("Zip" ),"'","''" ) & ", "
myCommandText = myCommandText & replace(request.Form("Phon e"),"'","' '") & ",
myCommandText = myCommandText & replace(request.Form("Scho ol"),"'"," ''") & ", "
myCommandText = myCommandText & replace(request.Form("Grad e"),"'","' '") & ", "
myCommandText = myCommandText & replace(request.Form("Birt hday"),"'" ,"''") & ", "
myCommandText = myCommandText & replace(request.Form("P_Fi rstName"), "'","''") & ", "
myCommandText = myCommandText & replace(request.Form("P_La stName")," '","''") & ", "
myCommandText = myCommandText & replace(request.Form("Leve l711"),"'" ,"''") & ", "
myCommandText = myCommandText & replace(request.Form("Leve 1214"),"'" ,"''") & ", "
myCommandText = myCommandText & replace(request.Form("Gend er"),"'"," ''") & ", "
myCommandText = myCommandText & replace(request.Form("Tshi rtSize")," '","''")
myCommandText = myCommandText & ")"
Set editCommand = Server.CreateObject("ADODB .Command")
editCommand.ActiveConnecti on = MM_Empire_STRING
editCommand.CommandText = myCommandText
editCommand.Execute
editCommand.ActiveConnecti on.Close
Set editCommand = Nothing
' -------------------------- ---------- ---------- ---------- ---------- ---------- ------
' 2 - SEND EMAIL
mySub="Your Form Details"
myBody="Your form details - " & VbCrLF
myBody =myBody & "FirstName: " & request.form("FirstName") & VbCrLF
myBody =myBody & "LastName: " & request.form("LastName") & VbCrLF
myBody =myBody & "Address: " & request.form("Address") & VbCrLF
myBody =myBody & "City: " & request.form("City") & VbCrLF
myBody =myBody & "Zip: " & request.form("Zip") & VbCrLF
myBody =myBody & "Phone: " & request.form("Phone") & VbCrLF
myBody =myBody & "School: " & request.form("School") & VbCrLF
myBody =myBody & "Grade: " & request.form("Grade") & VbCrLF
myBody =myBody & "Birthday: " & request.form("Birthday") & VbCrLF
myBody =myBody & "P_FirstName: " & request.form("P_FirstName" ) & VbCrLF
myBody =myBody & "L_FirstName: " & request.form("P_LastName") & VbCrLF
myBody =myBody & "Level711: " & request.form("Level711") & VbCrLF
myBody =myBody & "Leve1214: " & request.form("Leve1214") & VbCrLF
myBody =myBody & "Gender: " & request.form("Gender") & VbCrLF
myBody =myBody & "TshirtSize: " & request.form("TshirtSize") & VbCrLF
Set myMail=CreateObject("CDO.M essage")
myMail.Subject=mySub
myMail.From="Kathy@empirev olleyball. com"
myMail.To="Kathy@empirevol leyball.co m"
myMail.TextBody=myBody
myMail.Configuration.Field s.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =2
myMail.Configuration.Field s.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="mail.emp irevolleyb all.com"
myMail.Configuration.Field s.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") =25
myMail.Configuration.Field s.Update
myMail.Send
set myMail=nothing
' -------------------------- ---------- ---------- ---------- ---------- ---------- ------
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Empire Volleyball</title>
<style type="text/css">
<!--
body { background-color: #000000;}
.style1 {font-family: "Copperplate Gothic Bold"}
.style3 {font-family: "Copperplate Gothic Bold"; color: #00CCFF; }
.style5 {font-family: "Copperplate Gothic Bold"; color: #990099; }
.style7 {font-size: 24px}
-->
</style>
</head>
<body>
<table width="233" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="234">
<img src="Top/EmpireShadow250x2 50.gif" width="234" height="206" hspace="0" vspace="0"></td>
<td colspan="2">
<object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
width="725" height="210">
<param name="movie" value="Top/Empirevolleybal l.swf">
<param name="quality" value="high">
<param name="BGCOLOR" value="#FFFFFF">
<embed src="Top/Empirevolleyball. swf" width="725" height="210" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
type="application/x-shockw ave-flash" bgcolor="#FFFFFF"></embed>
</object>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="54" bgcolor="#990099"> </ td>
<td colspan="2" bgcolor="#000000">
<object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
width="970" height="414" style="position: absolute; top: 225px; left: 5px; z-index: 1;
visibility: visible;">
<param name="movie" value="Menu/empiretop_nav. swf" />
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="transparent" />
<embed src="Menu/empiretop_nav.sw f" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockw ave-flash" width="970" height="414" allowscriptaccess="always"
wmode="transparent"></embe d>
</object>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td rowspan="5" bgcolor="#990099"> </ td>
<td width="28" rowspan="5" bgcolor="#000000">
<p>
<object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
width="517" height="328" style="position: absolute; top: 271px; left: 10px; z-index: 1;
visibility: visible;">
<param name="movie" value="Menu/empireleft_nav .swf" />
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="transparent" />
<embed src="Menu/empireleft_nav.s wf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockw ave-flash" width="517" height="328" allowscriptaccess="always"
wmode="transparent"></embe d>
</object>
</p>
</td>
<td width="697" height="73">
<p align="center"><span class="style1">
<br>
<span class="style7">You have successfully signed up for
<br>
Empire's Junior Youth League.</span></span></p>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="37">
<div align="center">
<span class="style1">Two levels will be offered for each session.</span><br>
</div>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="72">
<div align="center">
<span class="style1">Level One: Ages 7-11 &
<br>
Level Two: Ages 12-14<br>
<br>
</span>
</div>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="98" bgcolor="#000000">
<div align="center">
<p class="style3"><span class="style1">
<br>
<span class="style5">Sign-ups and opening clinic</span><br>
Friday, April 20</span><br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 1: Friday, May 4<br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 2: Friday, May 11<br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 3: Friday, May 18<br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 4: Friday, May 25<br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 5: Friday, June 1<br>
5-7 pm Sonoma State University main gym</p>
<p class="style3">Session 6: Friday, June 8<br>
5-7 pm Sonoma State University main gym </p>
</div>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="19"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#000000"> </ td>
<td colspan="2" bgcolor="#000000"> </ td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#990099"> </ td>
<td colspan="2" bgcolor="#990099"> </ td>
</tr>
</table>
</body>
</html>
************************** ********** ********** ********** ********** ********** ********** ********** ********** ********** ***
Based on the above I have tried to rewrite the 2 pages. Therefore DW might now kick up problem saying it can't do certain stuff. This is because I have removed DW's code because it is not user friendly and is way over-complex.
Now I can't test this page out because I don't have the database, so there might be some slight ASP errors to fix before it works correctly. Please don't try to fix them yourself because then my copy of the file will end up being different to yours - creating more problems! Just post the error you see on-screen and I'll address them from my copy!
Okay here are the files:
*** JUNIOR.ASP **************************
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Empire Volleyball</title>
<style type="text/css">
<!--
body {background-color: #080808;}
-->
</style></head>
<body>
<table width="233" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#FFFFFF"><img src="Top/EmpireShadow250x2
<td colspan="4"><object classid="clsid:D27CDB6E-AE
<param name="movie" value="Top/Empirevolleybal
<param name=quality value=high>
<param name="BGCOLOR" value="#FFFFFF">
<embed src="Top/Empirevolleyball.
</object></td>
</tr>
<tr>
<td height="78" bgcolor="#990099"><object classid="clsid:D27CDB6E-AE
<param name="movie" value="Menu/empiretop_nav.
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="transparent" />
<embed src="Menu/empiretop_nav.sw
</object></td>
<td colspan="4" bgcolor="#080808"> </
</tr>
<tr>
<td bgcolor="#990099"> </
<td colspan="4" bgcolor="#FFFFFF">
<form method="POST" action="juniorsuccess.asp"
<table align="center">
<tr valign="baseline">
<td nowrap align="right">First Name:</td>
<td><input type="text" name="FirstName" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Last Name:</td>
<td><input type="text" name="LastName" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Address:</td
<td><input type="text" name="Address" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">City:</td>
<td><input type="text" name="City" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Zip:</td>
<td><input type="text" name="Zip" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Phone:</td>
<td><input type="text" name="Phone" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">School:</td>
<td><input type="text" name="School" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Grade:</td>
<td><input type="text" name="Grade" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Birthday:</t
<td><input type="text" name="Birthday" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Parents First Name:</td>
<td><input type="text" name="P_FirstName" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Parents Last Name:</td>
<td><input type="text" name="P_LastName" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Ages 7 to 11:</td>
<td><input type="checkbox" name="Level711" value=1 >
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Ages 11 to 14:</td>
<td><input type="checkbox" name="Leve1214" value=1 >
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Gender:</td>
<td><input type="text" name="Gender" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">T- Shirt Size:</td>
<td><input type="text" name="TshirtSize" value="" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right"> </td>
<td><input type="submit" value="Insert Participant">
</td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1">
</form>
<p> </p></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr bgcolor="#990099">
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<object classid="clsid:D27CDB6E-AE
<param name="movie" value="Menu/empireleft_nav
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="transparent" />
<embed src="Menu/empireleft_nav.s
</object>
</body>
</html>
**************************
*** JUNIORSUCCESS.ASP **************************
<%@ language="VBSCRIPT" codepage="1252" %>
<!--#include file="Connections/Empire.a
<%
' --------------------------
' 1 - INSERT THE NEW RECORD
Dim myCommandText, editCommand
myCommandText = "INSERT INTO YouthLeague ("
myCommandText = myCommandText & "FirstName, "
myCommandText = myCommandText & "LastName ,"
myCommandText = myCommandText & "Address, "
myCommandText = myCommandText & "City, "
myCommandText = myCommandText & "Zip, "
myCommandText = myCommandText & "Phone,"
myCommandText = myCommandText & "School, "
myCommandText = myCommandText & "Grade "
myCommandText = myCommandText & "Birthday, "
myCommandText = myCommandText & "P_FirstName, "
myCommandText = myCommandText & "P_LastName, "
myCommandText = myCommandText & "Level711, "
myCommandText = myCommandText & "Leve1214, "
myCommandText = myCommandText & "Gender, "
myCommandText = myCommandText & "TshirtSize"
myCommandText = myCommandText & ")"
myCommandText = myCommandText & " VALUES "
myCommandText = myCommandText & "("
myCommandText = myCommandText & replace(request.Form("Firs
myCommandText = myCommandText & replace(request.Form("Last
myCommandText = myCommandText & replace(request.Form("Addr
myCommandText = myCommandText & replace(request.Form("City
myCommandText = myCommandText & replace(request.Form("Zip"
myCommandText = myCommandText & replace(request.Form("Phon
myCommandText = myCommandText & replace(request.Form("Scho
myCommandText = myCommandText & replace(request.Form("Grad
myCommandText = myCommandText & replace(request.Form("Birt
myCommandText = myCommandText & replace(request.Form("P_Fi
myCommandText = myCommandText & replace(request.Form("P_La
myCommandText = myCommandText & replace(request.Form("Leve
myCommandText = myCommandText & replace(request.Form("Leve
myCommandText = myCommandText & replace(request.Form("Gend
myCommandText = myCommandText & replace(request.Form("Tshi
myCommandText = myCommandText & ")"
Set editCommand = Server.CreateObject("ADODB
editCommand.ActiveConnecti
editCommand.CommandText = myCommandText
editCommand.Execute
editCommand.ActiveConnecti
Set editCommand = Nothing
' --------------------------
' 2 - SEND EMAIL
mySub="Your Form Details"
myBody="Your form details - " & VbCrLF
myBody =myBody & "FirstName: " & request.form("FirstName") & VbCrLF
myBody =myBody & "LastName: " & request.form("LastName") & VbCrLF
myBody =myBody & "Address: " & request.form("Address") & VbCrLF
myBody =myBody & "City: " & request.form("City") & VbCrLF
myBody =myBody & "Zip: " & request.form("Zip") & VbCrLF
myBody =myBody & "Phone: " & request.form("Phone") & VbCrLF
myBody =myBody & "School: " & request.form("School") & VbCrLF
myBody =myBody & "Grade: " & request.form("Grade") & VbCrLF
myBody =myBody & "Birthday: " & request.form("Birthday") & VbCrLF
myBody =myBody & "P_FirstName: " & request.form("P_FirstName"
myBody =myBody & "L_FirstName: " & request.form("P_LastName")
myBody =myBody & "Level711: " & request.form("Level711") & VbCrLF
myBody =myBody & "Leve1214: " & request.form("Leve1214") & VbCrLF
myBody =myBody & "Gender: " & request.form("Gender") & VbCrLF
myBody =myBody & "TshirtSize: " & request.form("TshirtSize")
Set myMail=CreateObject("CDO.M
myMail.Subject=mySub
myMail.From="Kathy@empirev
myMail.To="Kathy@empirevol
myMail.TextBody=myBody
myMail.Configuration.Field
myMail.Configuration.Field
myMail.Configuration.Field
myMail.Configuration.Field
myMail.Send
set myMail=nothing
' --------------------------
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Empire Volleyball</title>
<style type="text/css">
<!--
body { background-color: #000000;}
.style1 {font-family: "Copperplate Gothic Bold"}
.style3 {font-family: "Copperplate Gothic Bold"; color: #00CCFF; }
.style5 {font-family: "Copperplate Gothic Bold"; color: #990099; }
.style7 {font-size: 24px}
-->
</style>
</head>
<body>
<table width="233" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="234">
<img src="Top/EmpireShadow250x2
<td colspan="2">
<object classid="clsid:D27CDB6E-AE
width="725" height="210">
<param name="movie" value="Top/Empirevolleybal
<param name="quality" value="high">
<param name="BGCOLOR" value="#FFFFFF">
<embed src="Top/Empirevolleyball.
type="application/x-shockw
</object>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="54" bgcolor="#990099"> </
<td colspan="2" bgcolor="#000000">
<object classid="clsid:D27CDB6E-AE
width="970" height="414" style="position: absolute; top: 225px; left: 5px; z-index: 1;
visibility: visible;">
<param name="movie" value="Menu/empiretop_nav.
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="transparent" />
<embed src="Menu/empiretop_nav.sw
type="application/x-shockw
wmode="transparent"></embe
</object>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td rowspan="5" bgcolor="#990099"> </
<td width="28" rowspan="5" bgcolor="#000000">
<p>
<object classid="clsid:D27CDB6E-AE
width="517" height="328" style="position: absolute; top: 271px; left: 10px; z-index: 1;
visibility: visible;">
<param name="movie" value="Menu/empireleft_nav
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="transparent" />
<embed src="Menu/empireleft_nav.s
type="application/x-shockw
wmode="transparent"></embe
</object>
</p>
</td>
<td width="697" height="73">
<p align="center"><span class="style1">
<br>
<span class="style7">You have successfully signed up for
<br>
Empire's Junior Youth League.</span></span></p>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="37">
<div align="center">
<span class="style1">Two levels will be offered for each session.</span><br>
</div>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="72">
<div align="center">
<span class="style1">Level One: Ages 7-11 &
<br>
Level Two: Ages 12-14<br>
<br>
</span>
</div>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="98" bgcolor="#000000">
<div align="center">
<p class="style3"><span class="style1">
<br>
<span class="style5">Sign-ups and opening clinic</span><br>
Friday, April 20</span><br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 1: Friday, May 4<br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 2: Friday, May 11<br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 3: Friday, May 18<br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 4: Friday, May 25<br>
5-7 pm Sonoma State University main gym<br>
<br>
Session 5: Friday, June 1<br>
5-7 pm Sonoma State University main gym</p>
<p class="style3">Session 6: Friday, June 8<br>
5-7 pm Sonoma State University main gym </p>
</div>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="19"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#000000"> </
<td colspan="2" bgcolor="#000000"> </
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#990099"> </
<td colspan="2" bgcolor="#990099"> </
</tr>
</table>
</body>
</html>
**************************
ASKER
Here is the error I get
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
/juniorsuccess.asp, line 47
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
/juniorsuccess.asp, line 47
ASKER
Do I n need to add a recordset?
No, a recordset is not needed as we are now doing this manually. Let me have a look and get back to you shortly...
Okay there was a single comma missing from the insert statement. Please paste this code over the top of the code in juniorsuccess.asp
Dim myCommandText, editCommand
myCommandText = "INSERT INTO YouthLeague ("
myCommandText = myCommandText & "FirstName, "
myCommandText = myCommandText & "LastName, "
myCommandText = myCommandText & "Address, "
myCommandText = myCommandText & "City, "
myCommandText = myCommandText & "Zip, "
myCommandText = myCommandText & "Phone, "
myCommandText = myCommandText & "School, "
myCommandText = myCommandText & "Grade, "
myCommandText = myCommandText & "Birthday, "
myCommandText = myCommandText & "P_FirstName, "
myCommandText = myCommandText & "P_LastName, "
myCommandText = myCommandText & "Level711, "
myCommandText = myCommandText & "Leve1214, "
myCommandText = myCommandText & "Gender, "
myCommandText = myCommandText & "TshirtSize"
myCommandText = myCommandText & ")"
myCommandText = myCommandText & " VALUES "
myCommandText = myCommandText & "("
myCommandText = myCommandText & replace(request.Form("Firs tName"),"' ","''") & ", "
myCommandText = myCommandText & replace(request.Form("Last Name"),"'" ,"''") & ", "
myCommandText = myCommandText & replace(request.Form("Addr ess"),"'", "''") & ", "
myCommandText = myCommandText & replace(request.Form("City "),"'","'' ") & ", "
myCommandText = myCommandText & replace(request.Form("Zip" ),"'","''" ) & ", "
myCommandText = myCommandText & replace(request.Form("Phon e"),"'","' '") & ", "
myCommandText = myCommandText & replace(request.Form("Scho ol"),"'"," ''") & ", "
myCommandText = myCommandText & replace(request.Form("Grad e"),"'","' '") & ", "
myCommandText = myCommandText & replace(request.Form("Birt hday"),"'" ,"''") & ", "
myCommandText = myCommandText & replace(request.Form("P_Fi rstName"), "'","''") & ", "
myCommandText = myCommandText & replace(request.Form("P_La stName")," '","''") & ", "
myCommandText = myCommandText & replace(request.Form("Leve l711"),"'" ,"''") & ", "
myCommandText = myCommandText & replace(request.Form("Leve 1214"),"'" ,"''") & ", "
myCommandText = myCommandText & replace(request.Form("Gend er"),"'"," ''") & ", "
myCommandText = myCommandText & replace(request.Form("Tshi rtSize")," '","''")
myCommandText = myCommandText & ")"
Dim myCommandText, editCommand
myCommandText = "INSERT INTO YouthLeague ("
myCommandText = myCommandText & "FirstName, "
myCommandText = myCommandText & "LastName, "
myCommandText = myCommandText & "Address, "
myCommandText = myCommandText & "City, "
myCommandText = myCommandText & "Zip, "
myCommandText = myCommandText & "Phone, "
myCommandText = myCommandText & "School, "
myCommandText = myCommandText & "Grade, "
myCommandText = myCommandText & "Birthday, "
myCommandText = myCommandText & "P_FirstName, "
myCommandText = myCommandText & "P_LastName, "
myCommandText = myCommandText & "Level711, "
myCommandText = myCommandText & "Leve1214, "
myCommandText = myCommandText & "Gender, "
myCommandText = myCommandText & "TshirtSize"
myCommandText = myCommandText & ")"
myCommandText = myCommandText & " VALUES "
myCommandText = myCommandText & "("
myCommandText = myCommandText & replace(request.Form("Firs
myCommandText = myCommandText & replace(request.Form("Last
myCommandText = myCommandText & replace(request.Form("Addr
myCommandText = myCommandText & replace(request.Form("City
myCommandText = myCommandText & replace(request.Form("Zip"
myCommandText = myCommandText & replace(request.Form("Phon
myCommandText = myCommandText & replace(request.Form("Scho
myCommandText = myCommandText & replace(request.Form("Grad
myCommandText = myCommandText & replace(request.Form("Birt
myCommandText = myCommandText & replace(request.Form("P_Fi
myCommandText = myCommandText & replace(request.Form("P_La
myCommandText = myCommandText & replace(request.Form("Leve
myCommandText = myCommandText & replace(request.Form("Leve
myCommandText = myCommandText & replace(request.Form("Gend
myCommandText = myCommandText & replace(request.Form("Tshi
myCommandText = myCommandText & ")"
ASKER
I saw the quotes for the phone record changed but I get an unsucessful page
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
/juniorsuccess.asp, line 47
is the error message
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
/juniorsuccess.asp, line 47
is the error message
ASKER
Maybe I can build new pages that would better suit what I want I liked your explanation about the pages trying to do two things at once. What sequence would you use knowing I have to use asp pages (due to the server and the acesss database) and knowing I wanted to send the same fields that were entered to an email and a database. I would like any info you can give
I understand your frustration here, but you'll actually end up with the exact same page I'm trying to sort for you, except you'll have all the hassle of understanding each line of code! The error was once again something very slight, so let's hope this is the one...!
Dim myCommandText, editCommand
myCommandText = "INSERT INTO YouthLeague ("
myCommandText = myCommandText & "FirstName, "
myCommandText = myCommandText & "LastName, "
myCommandText = myCommandText & "Address, "
myCommandText = myCommandText & "City, "
myCommandText = myCommandText & "Zip, "
myCommandText = myCommandText & "Phone, "
myCommandText = myCommandText & "School, "
myCommandText = myCommandText & "Grade, "
myCommandText = myCommandText & "Birthday, "
myCommandText = myCommandText & "P_FirstName, "
myCommandText = myCommandText & "P_LastName, "
myCommandText = myCommandText & "Level711, "
myCommandText = myCommandText & "Leve1214, "
myCommandText = myCommandText & "Gender, "
myCommandText = myCommandText & "TshirtSize"
myCommandText = myCommandText & ")"
myCommandText = myCommandText & " VALUES "
myCommandText = myCommandText & "("
myCommandText = myCommandText & "'" & replace(request.Form("Firs tName"),"' ","''") & "', "
myCommandText = myCommandText & "'" & replace(request.Form("Last Name"),"'" ,"''") & "', "
myCommandText = myCommandText & "'" & replace(request.Form("Addr ess"),"'", "''") & "', "
myCommandText = myCommandText & "'" & replace(request.Form("City "),"'","'' ") & "', "
myCommandText = myCommandText & "'" & replace(request.Form("Zip" ),"'","''" ) & "', "
myCommandText = myCommandText & "'" & replace(request.Form("Phon e"),"'","' '") & "', "
myCommandText = myCommandText & "'" & replace(request.Form("Scho ol"),"'"," ''") & "', "
myCommandText = myCommandText & "'" & replace(request.Form("Grad e"),"'","' '") & "', "
myCommandText = myCommandText & "'" & replace(request.Form("Birt hday"),"'" ,"''") & "', "
myCommandText = myCommandText & "'" & replace(request.Form("P_Fi rstName"), "'","''") & "', "
myCommandText = myCommandText & "'" & replace(request.Form("P_La stName")," '","''") & "', "
myCommandText = myCommandText & "'" & replace(request.Form("Leve l711"),"'" ,"''") & "', "
myCommandText = myCommandText & "'" & replace(request.Form("Leve 1214"),"'" ,"''") & "', "
myCommandText = myCommandText & "'" & replace(request.Form("Gend er"),"'"," ''") & "', "
myCommandText = myCommandText & "'" & replace(request.Form("Tshi rtSize")," '","''") & "'"
myCommandText = myCommandText & ")"
Dim myCommandText, editCommand
myCommandText = "INSERT INTO YouthLeague ("
myCommandText = myCommandText & "FirstName, "
myCommandText = myCommandText & "LastName, "
myCommandText = myCommandText & "Address, "
myCommandText = myCommandText & "City, "
myCommandText = myCommandText & "Zip, "
myCommandText = myCommandText & "Phone, "
myCommandText = myCommandText & "School, "
myCommandText = myCommandText & "Grade, "
myCommandText = myCommandText & "Birthday, "
myCommandText = myCommandText & "P_FirstName, "
myCommandText = myCommandText & "P_LastName, "
myCommandText = myCommandText & "Level711, "
myCommandText = myCommandText & "Leve1214, "
myCommandText = myCommandText & "Gender, "
myCommandText = myCommandText & "TshirtSize"
myCommandText = myCommandText & ")"
myCommandText = myCommandText & " VALUES "
myCommandText = myCommandText & "("
myCommandText = myCommandText & "'" & replace(request.Form("Firs
myCommandText = myCommandText & "'" & replace(request.Form("Last
myCommandText = myCommandText & "'" & replace(request.Form("Addr
myCommandText = myCommandText & "'" & replace(request.Form("City
myCommandText = myCommandText & "'" & replace(request.Form("Zip"
myCommandText = myCommandText & "'" & replace(request.Form("Phon
myCommandText = myCommandText & "'" & replace(request.Form("Scho
myCommandText = myCommandText & "'" & replace(request.Form("Grad
myCommandText = myCommandText & "'" & replace(request.Form("Birt
myCommandText = myCommandText & "'" & replace(request.Form("P_Fi
myCommandText = myCommandText & "'" & replace(request.Form("P_La
myCommandText = myCommandText & "'" & replace(request.Form("Leve
myCommandText = myCommandText & "'" & replace(request.Form("Leve
myCommandText = myCommandText & "'" & replace(request.Form("Gend
myCommandText = myCommandText & "'" & replace(request.Form("Tshi
myCommandText = myCommandText & ")"
ASKER
Oh dont get me wrong ill take any and all your sugesstions. I got another error message
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
/juniorsuccess.asp, line 47
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
/juniorsuccess.asp, line 47
Can you please tell me the data type of each database column that you are trying to save to?
i.e. datetime, text, yes/no field etc
i.e. datetime, text, yes/no field etc
Also, what database are you using? Access/SQL etc
ASKER
i am using access and each field is a textbox except for the
Level711
Leve1214
fields they are yes/no fields
Level711
Leve1214
fields they are yes/no fields
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank You
Hurray! You're welcome :-)
... thanks for your patience!
... thanks for your patience!
>> showing true
On each line change this:
<input name="FirstName" type="text" value="<%=(FirstName = Request.form("FirstName"))
to this
<input name="FirstName" type="text" value="<%=(Request.form("F
and in the email for each line change
myBody =myBody & "FirstName : " & FirstName & VbCrLF
to this
myBody =myBody & "FirstName : " & request.form("FirstName") & VbCrLF