Variable PAGE_ID is undefined?
Hello,
I am new to ColdFusion and am having trouble with some code. I keep getting an error that the variable page_id is undefined. I do not have a form input for this code, I am just trying to get an output of something like this. Thanks in advance, any help is greatly appreciated!!
http://url/getImage.cfm?corner=558349
Here is my code.
<CFQUERY name="cr" datasource="sire" dbtype="odbc">
SELECT page_id
FROM sire.dbo.CORNER_REPORTS_Page
WHERE page_id = <cfqueryPARAM value = "#page_id#"
CFSQLType = 'CF_SQL_INTEGER'>
</cfquery>
<cfset page_id = #page_id#>
<cfdump var = #page_id#>
<cfoutput>
<cfcontent file= "http://url/image/CORNER_REPORTS/0/#page_id#" type="application/pdf">
</cfoutput>
