<HTML>
<HEAD><TITLE>Film Information</TITLE></HEAD>
<BODY>
<H2>Film Information</H2>

<!--- Retrieve Ratings from database --->
<CFQUERY NAME="GetRatings" DATASOURCE="#REQUEST.DataSource#">
  SELECT RatingID, Rating
  FROM FilmsRatings
  ORDER BY Rating
</CFQUERY>  

<!--- Retrieve Films from database --->
<CFQUERY NAME="GetFilms" DATASOURCE="#REQUEST.DataSource#">
  SELECT FilmID, MovieTitle
  FROM Films
  ORDER BY Films.MovieTitle
</CFQUERY>
  

<!--- Create self-submitting form --->
<CFFORM ACTION="#CGI.SCRIPT_NAME#" METHOD="Post">
  <!--- Display Film names in a drop-down list --->
  <P>Films:
  <CFSELECT
    QUERY="GetFilms" NAME="FilmID"
    VALUE="FilmID" DISPLAY="MovieTitle"/>

  <!--- Display Rating names in a drop-down list --->
  <P>Ratings:
  <CFSELECT
    QUERY="GetRatings" NAME="RatingID"
    VALUE="RatingID" DISPLAY="Rating"/>

</CFFORM>
      
</BODY>
</HTML>
