HTML for the ShowTimes Page
Next, let's create the ShowTimes page. Use Studio to do this. Name the file ShowTimes.csp and save it in csp/user.
Add the following HTML to the page. Most of it is familiar: we are, once again, using a <csp:query> tag to retrieve data, a <csp:while> tag to loop through the results, and Caché data references, such as
#(Times.Get("StartTime"))#
to add data to our page.
The new element here is the “P1” attribute in our <csp:query>. You will recall that P1 was used in the query to identify which film interests us.
ShowTimes.csp
<html> <body>
<csp:query name="Times" classname="Cinema.Show"
queryname="ShowTimes" P1='#(%request.Data("FilmID",1))#'>
<table cellpadding=5>
<tr>
<td><b>Time</b></td>
<td><b>Theater</b></td>
</tr>
<csp:while condition="Times.Next()">
<tr>
<td>#(Times.Get("StartTime"))#</td>
<td>#(Times.Get("TheaterName"))#</td>
</tr>
</csp:while>
</table>
</body> </html>