3 Replies - 6002 Views - Last Post: 30 March 2009 - 03:26 AM Rate Topic: -----

#1 ddrumm  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 24-February 09

Element BROCHURE is undefined in URL.

Post icon  Posted 24 March 2009 - 02:29 AM

Hi folks
im getting the below error message when i try and display the website, and cant figure out what the problem is
Element BROCHURE is undefined in URL.

Heres the code if it helps

[/b]<CFQUERY NAME="qupdate" DATASOURCE="#request.dsn#">
	SELECT * 
	FROM BROCHURE, BROCHURESIZE
	where BROCHURE_ItemID = #url.brochure#
</CFQUERY>


<form method="post" action = "results.cfm">
<cfif isdefined("url.brochure")>
<input type="hidden" name="BROCHURE_ItemID" value="#url.brochure#">
<input type="hidden" name="BROCHURESIZE_Key" value="#url.brochure#">

</cfif>

<cfif isdefined("form.BROCHURE_ItemID")>
<!--- this is an update --->
<cfquery name="qupdate" datasource="#request.dsn#">
update BROCHURE, BROCHURESIZE
set DIVISIONS_Key = #form.DIVISIONS_Key#,
BROCHURESIZE_Key = '#form.BROCHURESIZE_Key#',
BROCHURE_Title = '#form.BROCHURE_Title#',
BROCHURE_Detail = '#form.BROCHURE_Detail#'
BROCHURESIZE_Name = '#form.BROCHURESIZE_Name#'
where BROCHURE_ItemID = #form.BROCHURE_ItemID#
</cfquery>
<cfelse>
<!--- this is an insert --->
<cfquery name="qupdate" datasource="#request.dsn#">
insert into BROCHURE, BROCHURESIZE
(DIVISIONS_Key,BROCHURE_Size,BROCHURE_Title,BROCHURE_Detail,)
values
(#form.DIVISIONS_Key#,'#form.BROCHURE_Title#','#form.BROCHURE_Detail#','#form.BROCHURESIZE_Name#')
</cfquery>
</cfif>
<cflocation url="index.cfm"> [b]


Is This A Good Question/Topic? 0
  • +

Replies To: Element BROCHURE is undefined in URL.

#2 CR250  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 58
  • Joined: 14-June 08

Re: Element BROCHURE is undefined in URL.

Posted 24 March 2009 - 06:55 AM

For starters please use <cfqueryparam /> especially for URL, post parameters but really everywhere.

As for your issue dump url and make sure its appearing correctly.
Was This Post Helpful? 0
  • +
  • -

#3 xheartonfire43x  Icon User is offline

  • D.I.C Regular

Reputation: 46
  • View blog
  • Posts: 454
  • Joined: 22-December 08

Re: Element BROCHURE is undefined in URL.

Posted 24 March 2009 - 07:38 AM

The error is being called from you query most likely which doesn't check whether or now url.brochure is defined. So either put a <cfif isDefined('url.brochure')> or put <cfparam name="url.brochure" default="whatever brochure you want as the default">.
Was This Post Helpful? 0
  • +
  • -

#4 ddrumm  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 24-February 09

Re: Element BROCHURE is undefined in URL.

Posted 30 March 2009 - 03:26 AM

View Postxheartonfire43x, on 24 Mar, 2009 - 06:38 AM, said:

The error is being called from you query most likely which doesn't check whether or now url.brochure is defined. So either put a <cfif isDefined('url.brochure')> or put <cfparam name="url.brochure" default="whatever brochure you want as the default">.



Cheers Thanks for that :^:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1