Hey all,
I have a CF template with two "DISTINCT" SELECT statements. I'm using both of them to narrow down two database fields to only unique values. Then I'm using those two queries to populate one form to pass off the variables.
The problem I'm having is when i try to pass off the form inofrmation, the action page is dropping off an "Error resolving parameter" message saying that "The specified form field cannot be found." I assume that this is a pretty common error, but to the best of my knowledge, the form field name is correct. Code follows.
<!--- Begin form page --->
<html>
<head>
<title>test page</title
</head>
<body>
<cfquery name="events2" datasource="ksuperc">
SELECT * FROM events2 ORDER BY event_year, event_semester
</cfquery>
<cfquery name="get_semester" datasource="ksuperc">
SELECT DISTINCT event_semester FROM events2
</cfquery>
<cfquery name="get_year" datasource="ksuperc">
SELECT DISTINCT event_year FROM events2
</cfquery>
<form action="display.cfm?event_year=#event_year#&event_semester=#event_semester#" metohd="post">
<select name="semester">
<cfoutput query="get_semester">
<option value="#event_semester#">#event_semester#</option>
</cfoutput>
</select>
<select name="year">
<cfoutput query="get_year">
<option value="#event_year#">#event_year#</option>
</cfoutput>
</select>
<input type="submit" value="search">
</form>
<!--- end form page --->
<!--- begin action page --->
<html>
<head>
<title>test page</title
</head>
<body>
<cfquery name="display" datasource="ksuperc">
SELECT * FROM events WHERE event_semester='#form.semester#' AND event_year=#form.year#
</cfquery>
<cfoutput query="display">
<p>Name: #event_name#<br>
Date: #dateformat('#event_day#', "mmmm d, yyyy"
#
</cfoutput>
<!--- end action page --->
Thanks in advance for any help you folks can give me.
-b-
I have a CF template with two "DISTINCT" SELECT statements. I'm using both of them to narrow down two database fields to only unique values. Then I'm using those two queries to populate one form to pass off the variables.
The problem I'm having is when i try to pass off the form inofrmation, the action page is dropping off an "Error resolving parameter" message saying that "The specified form field cannot be found." I assume that this is a pretty common error, but to the best of my knowledge, the form field name is correct. Code follows.
<!--- Begin form page --->
<html>
<head>
<title>test page</title
</head>
<body>
<cfquery name="events2" datasource="ksuperc">
SELECT * FROM events2 ORDER BY event_year, event_semester
</cfquery>
<cfquery name="get_semester" datasource="ksuperc">
SELECT DISTINCT event_semester FROM events2
</cfquery>
<cfquery name="get_year" datasource="ksuperc">
SELECT DISTINCT event_year FROM events2
</cfquery>
<form action="display.cfm?event_year=#event_year#&event_semester=#event_semester#" metohd="post">
<select name="semester">
<cfoutput query="get_semester">
<option value="#event_semester#">#event_semester#</option>
</cfoutput>
</select>
<select name="year">
<cfoutput query="get_year">
<option value="#event_year#">#event_year#</option>
</cfoutput>
</select>
<input type="submit" value="search">
</form>
<!--- end form page --->
<!--- begin action page --->
<html>
<head>
<title>test page</title
</head>
<body>
<cfquery name="display" datasource="ksuperc">
SELECT * FROM events WHERE event_semester='#form.semester#' AND event_year=#form.year#
</cfquery>
<cfoutput query="display">
<p>Name: #event_name#<br>
Date: #dateformat('#event_day#', "mmmm d, yyyy"
</cfoutput>
<!--- end action page --->
Thanks in advance for any help you folks can give me.
-b-