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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

626 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