Problem updating fileds with URL parameter

Posted on 2011-03-16
Last Modified: 2012-05-11
When I update with the second form, it runs but the fields do not update.  If I change '#URL.ID#' to the id number that is in the url it does update the fields.  What am I missing?

<cfparam name="URL.ID" default="">
<cfparam name="FORM.Firm" default="">
 <cfparam name="FORM.GROW" default="N"> 
<!--- Create an empty error string --->
<cfset strError = "">

<!--- If the form is submitted --->
<cfif isDefined("FORM.Submit")>
<!---    <cfset strError = ""> --->
 <cfquery  NAME="Added" datasource="#datasource#">
	        UPDATE SubscriptionIA
			SET Firm='#FORM.Firm#',

Open in new window

Question by:JohnMac328
  • 3
  • 2
LVL 39

Expert Comment

ID: 35151157
what is the action of your <FORM tag?  

You can remove the action completely so the page calls itself with all the same paramters, that will keep the parameter in tact.


Author Comment

ID: 35151179
It is

<cfform action="#cgi.script_name#" method="post">
LVL 39

Accepted Solution

gdemaria earned 500 total points
ID: 35151281

That's why, you're losing your query string variables.  

Did it work after removing the action?

You can also do it this way...

<cfform action="#cgi.script_name#?#cgi.query_string#" method="post">


Author Comment

ID: 35151308
I see - that makes sense.

Author Closing Comment

ID: 35151311
Thanks again

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now