Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / September 2007



Tip: Looking for answers? Try searching our database.

combining variables to create 1 variable

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
peewee_larkin - 02 Sep 2007 22:54 GMT
Hi!

I'm trying to set an update page where users can add data to existing database
entries.

I have a query to get tour dates, which are listed on the page. Any user can
add any missing information from the tour date information.

I have named all the possible missing data fields on the form as
"example_name#ID#" so that the action page has the ID number relevant to the
particular entry that the user wants to add to.

On the action page I have outputted the query to get the tour ID and looped
around a <cfif isdefined("form.example_name#ID#")> in order for the data to
recognise which entry to update.  I have then <cfset example_name =
"##"&"form.example_name"&"#ID#"&"##> to give the variable example_name a value
of #form.example_name14# (or whatever number that particular entries ID is.

I then query the insert to the table using VALUES ('example_name').  It
inserts the record as "#form.example_name14#".  Is there any way i can get the
variable processed so that it infact outputs the actual data entered by the
user?

Many thanks!
Dan Bracuk - 02 Sep 2007 23:19 GMT
Read this thread.
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=7&t
hreadid=1297220&enterthread=y

Dinghus - 03 Sep 2007 07:55 GMT
Quick question. Why are you dong a double #?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.