> OK - here's a hum-dinger for you...
> 
> How can I pass a variable from one page into another so that 
> it alters part of another variable?
> 
> e.g.
> 
> Page1.cfm
> <a href="page2.cfm?var_add=1&var=cheese">page two is cheese</a>
> <a href="page2.cfm?var_add=2&var=milk">page two is milk</a>
> 
> Page2.cfm
> <cfset test_#var_add# eq #var#>
> (this  ^^^^^^^^^^^^^^ is what I need to have working)

There are a couple of ways you can do this.

One way, which is the way I prefer, is to use the SetVariable function:

<!--- page2.cfm --->
<cfset rs = SetVariable("test_" & var_add, var)>

Alternatively, you can set a variable directly within a CFSET:

<cfset "test_#var_add#" = var>

I recommend the first, since the SetVariable function will be supported in
future versions of CF.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to