Hi
I am doing a registration form and I have a drop down menu where users can select a class. Once they have choosen their class from that drop down menu i want the description of the class to be displayed on the textbook i created. Further more once the user hits submit i want to capture in my database what class they chose..Also I am submitting the values to a table and need to send a confirmation email to myself and the user can someone tell me if I am doing this right or better yet guide me in the right direction?
..here is my form....all help will be appreciated....
<head>
<title>FMB Class Registration Form</title>
</head>
<cfparam name="action" default="showform">
<cfset #adminemail# = "ltrujillo@mhs.net">
<cfquery name="getab" datasource="#application.datasource#" dbtype="ODBC">
select * from westclreg order by class_id
</cfquery>
<cfoutput><form name="form1" action="#query_string#&action=postform" method="post"></cfoutput>
<table border="0" cellpadding="3" cellspacing="0" width=98%>
<tr>
<td colspan="2"><P align=center><font face="Times New Roman" size="5" color="CC0000"><STRONG>The
FMB<br>
Class Registration</STRONG></FONT></P>
<font size=2>
<P>For complete descriptions of classes, view our "<B><A href=">Class
Descriptions</A></B>." For dates and times, view our "<B><A href="">Calendar</A></B>."
</p>
<p>It is necessary to register for all classes. Please call xxxxxxxxxx
or complete our E-mail refistration form below. We will confirm your registration
by phone or E-mail. We look forward to hearing from you! </p>
</font> <hr> <P align=center><font face="Times New Roman" size="5" color="CC0000"><STRONG>
Class Registration</STRONG></FONT></P></td>
</tr>
<tr>
<td align="right"><font face="Verdana" size="2">Name:</font></td>
<td><font face="Verdana" size="2"><input type="text" name="name" size="26"></font></td>
</tr>
<tr>
<td align="right"><font face="Verdana" size="2">Email Address:</font></td>
<td><font face="Verdana" size="2"><input type="text" name="email" size="26"></font></td>
</tr>
<tr>
<td align="right"><font face="Verdana" size="2">Telephon Number:</font></td>
<td><font face="Verdana" size="2"><input type="text" name="telephone" size="26" required="yes" message="Telephone Number is required"></font></td>
</tr>
<tr>
<td align="right"><font face="Verdana" size="2">Altername Telephone:</td>
<td><font face="Verdana" size="2"><input type="text" name="alttelephone" size="26" required="yes" message="Telephone Number is required"></font></td>
</tr>
<tr>
<td align="right"><font face="Verdana" size="2">Address:</td>
<td><font face="Verdana" size="2"><input type="text" name="address" size="26" message="Telephone Number is required"></font></td>
</tr>
<tr>
<td align="right"><font face="Verdana" size="2">City:</td>
<td><font face="Verdena" size="2"><input name="city" type"text" size="26"></font></td>
</tr>
<tr>
<td align="right"><font face="Verdana" size="2">Zip Code:</td>
<td><font face="Verdana" size="2"><input name="zip" type="text" size="26" required="yes" message="Telephone Number is required"></font></td>
</tr>
<tr>
<td align="right"><font face="Verdana" size="2">Due Date:</font></td>
<td><font face="Verdana" size="2"><input type="text" name="duedate" size="26" required="yes" message="Due Date is Required"></font></td>
</tr>
<tr>
<td align="right"><font face="Verdana" size="2">Class you want to regiter
for: </font></td>
<td><font face="Verdana" size="2">
<select name="class">
<cfoutput query="getab">
<option value="#class_id#" >#class#</option>
</cfoutput>
</select>
</font></td>
</tr>
<tr>
<td align="center" colspan="2"> </td>
</tr>
<tr>
<td colspan="2" align="center" valign="top"><font face="Verdana" size="2">Class
Description:</font></td>
</tr>
<tr>
<td align="center" colspan="2"><textarea rows="10" name="message" cols="42">
#getab.description#</textarea></td>
</tr>
<tr>
<td colspan="2" align=center><input type="submit" value="SUBMIT REGISTRATION">
</form></td>
</tr>
</table>
<cfset name = "" >
<cfset email ="">
<cfif #action# IS 'postform' >
<cfquery name="insdb" datasource="west80139" dbtype="ODBC">
insert into westreginfo
(name,email,telephone,alttelephone,address,city,zip,duedate,class)
values
('#name#','#email#','#telephone#','#alttelephone#','#address#','#city#','#zip#','#duedate#','#class#')
</cfquery>
<cfif #name# IS NOT 'test' >
<!--- <cfif #gen_em# IS NOT '' >--->
<cfmail to="#adminemail#" from="laritrujillo@prodigy.net" subject="Class Regiatration">
#name# has just submitted a class registration
<!--- <cfif #req# GREATER THAN 0 >
Requisition Number: #req# - #jdesc#
<cfelse>
User has requested to be considered for ANY job</cfif>--->
</cfmail>
</cfif>
<cfmail to="#email#" from="#adminemail#" subject="Your Class Registration Confirmation Email" type="HTML">
<div align = center>
<IMG src="http:../images/mhslogoje.gif" >
</div><br>
Dear #name#:
<p>
Thank you for registring to the FBC.
Your registration has been forwarded to our class specialist.
If you class is reschedule or canceled, you will be contacted
with other options.
<p>
Thank you,
<p><p><br>
FBC Registration<br>
Specialist, Family BirthPlace<br>
MHW<br>
<p>
<P>
<br>
<table width = 100% border=0>
<tr><th colspan = 2 align = left >Family BirthPlace Contact Numbers:</th></tr>
<tr><td width = 60%>MHW </td><td width = 40%>(xxx) xxx-xxxx</td></tr>
<tr><td width = 60%>MRH </td><td width = 40%>(954) xxx-xxxx</td></tr>
<tr><td width = 60%>MRH </td><td width = 40%>(954) xxx-xxxx</td></tr>
</table>
</cfmail>
<p align=center><font color="cc0000" face="Verdana" size="3"><b>Thank you for submitting your registration.</font><p>
<div align=center>
<font face="Verdana" color="003399" size="2">
Your registration has been forwarded to our FBP Representative. </b></font>
<p>
<font face="Verdana" color="003399" size="2"><a href="_javascript:this.close()">Click here</a> to close this window</font>
</div>
</body>
</html>
</cfif>
I am doing a registration form and I have a drop down menu where users can select a class. Once they have choosen their class from that drop down menu i want the description of the class to be displayed on the textbook i created. Further more once the user hits submit i want to capture in my database what class they chose..Also I am submitting the values to a table and need to send a confirmation email to myself and the user can someone tell me if I am doing this right or better yet guide me in the right direction?
..here is my form....all help will be appreciated....
<head>
<title>FMB Class Registration Form</title>
</head>
<cfparam name="action" default="showform">
<cfset #adminemail# = "ltrujillo@mhs.net">
<cfquery name="getab" datasource="#application.datasource#" dbtype="ODBC">
select * from westclreg order by class_id
</cfquery>
<cfoutput><form name="form1" action="#query_string#&action=postform" method="post"></cfoutput>
<table border="0" cellpadding="3" cellspacing="0" width=98%>
<tr>
<td colspan="2"><P align=center><font face="Times New Roman" size="5" color="CC0000"><STRONG>The
FMB<br>
Class Registration</STRONG></FONT></P>
<font size=2>
<P>For complete descriptions of classes, view our "<B><A href=">Class
Descriptions</A></B>." For dates and times, view our "<B><A href="">Calendar</A></B>."
</p>
<p>It is necessary to register for all classes. Please call xxxxxxxxxx
or complete our E-mail refistration form below. We will confirm your registration
by phone or E-mail. We look forward to hearing from you! </p>
</font> <hr> <P align=center><font face="Times New Roman" size="5" color="CC0000"><STRONG>
Class Registration</STRONG></FONT></P></td>
</tr>
<tr>
<td align="right"><font face="Verdana" size="2">Name:</font></td>
<td><font face="Verdana" size="2"><input type="text" name="name" size="26"></font></td>
</tr>
<tr>
<td align="right"><font face="Verdana" size="2">Email Address:</font></td>
<td><font face="Verdana" size="2"><input type="text" name="email" size="26"></font></td>
</tr>
<tr>
<td align="right"><font face="Verdana" size="2">Telephon Number:</font></td>
<td><font face="Verdana" size="2"><input type="text" name="telephone" size="26" required="yes" message="Telephone Number is required"></font></td>
</tr>
<tr>
<td align="right"><font face="Verdana" size="2">Altername Telephone:</td>
<td><font face="Verdana" size="2"><input type="text" name="alttelephone" size="26" required="yes" message="Telephone Number is required"></font></td>
</tr>
<tr>
<td align="right"><font face="Verdana" size="2">Address:</td>
<td><font face="Verdana" size="2"><input type="text" name="address" size="26" message="Telephone Number is required"></font></td>
</tr>
<tr>
<td align="right"><font face="Verdana" size="2">City:</td>
<td><font face="Verdena" size="2"><input name="city" type"text" size="26"></font></td>
</tr>
<tr>
<td align="right"><font face="Verdana" size="2">Zip Code:</td>
<td><font face="Verdana" size="2"><input name="zip" type="text" size="26" required="yes" message="Telephone Number is required"></font></td>
</tr>
<tr>
<td align="right"><font face="Verdana" size="2">Due Date:</font></td>
<td><font face="Verdana" size="2"><input type="text" name="duedate" size="26" required="yes" message="Due Date is Required"></font></td>
</tr>
<tr>
<td align="right"><font face="Verdana" size="2">Class you want to regiter
for: </font></td>
<td><font face="Verdana" size="2">
<select name="class">
<cfoutput query="getab">
<option value="#class_id#" >#class#</option>
</cfoutput>
</select>
</font></td>
</tr>
<tr>
<td align="center" colspan="2"> </td>
</tr>
<tr>
<td colspan="2" align="center" valign="top"><font face="Verdana" size="2">Class
Description:</font></td>
</tr>
<tr>
<td align="center" colspan="2"><textarea rows="10" name="message" cols="42">
#getab.description#</textarea></td>
</tr>
<tr>
<td colspan="2" align=center><input type="submit" value="SUBMIT REGISTRATION">
</form></td>
</tr>
</table>
<cfset name = "" >
<cfset email ="">
<cfif #action# IS 'postform' >
<cfquery name="insdb" datasource="west80139" dbtype="ODBC">
insert into westreginfo
(name,email,telephone,alttelephone,address,city,zip,duedate,class)
values
('#name#','#email#','#telephone#','#alttelephone#','#address#','#city#','#zip#','#duedate#','#class#')
</cfquery>
<cfif #name# IS NOT 'test' >
<!--- <cfif #gen_em# IS NOT '' >--->
<cfmail to="#adminemail#" from="laritrujillo@prodigy.net" subject="Class Regiatration">
#name# has just submitted a class registration
<!--- <cfif #req# GREATER THAN 0 >
Requisition Number: #req# - #jdesc#
<cfelse>
User has requested to be considered for ANY job</cfif>--->
</cfmail>
</cfif>
<cfmail to="#email#" from="#adminemail#" subject="Your Class Registration Confirmation Email" type="HTML">
<div align = center>
<IMG src="http:../images/mhslogoje.gif" >
</div><br>
Dear #name#:
<p>
Thank you for registring to the FBC.
Your registration has been forwarded to our class specialist.
If you class is reschedule or canceled, you will be contacted
with other options.
<p>
Thank you,
<p><p><br>
FBC Registration<br>
Specialist, Family BirthPlace<br>
MHW<br>
<p>
<P>
<br>
<table width = 100% border=0>
<tr><th colspan = 2 align = left >Family BirthPlace Contact Numbers:</th></tr>
<tr><td width = 60%>MHW </td><td width = 40%>(xxx) xxx-xxxx</td></tr>
<tr><td width = 60%>MRH </td><td width = 40%>(954) xxx-xxxx</td></tr>
<tr><td width = 60%>MRH </td><td width = 40%>(954) xxx-xxxx</td></tr>
</table>
</cfmail>
<p align=center><font color="cc0000" face="Verdana" size="3"><b>Thank you for submitting your registration.</font><p>
<div align=center>
<font face="Verdana" color="003399" size="2">
Your registration has been forwarded to our FBP Representative. </b></font>
<p>
<font face="Verdana" color="003399" size="2"><a href="_javascript:this.close()">Click here</a> to close this window</font>
</div>
</body>
</html>
</cfif>