Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing variables without forms or URL's

Status
Not open for further replies.

ma701sd

IS-IT--Management
Dec 15, 2000
94
GB
Hi,
Is there a way of passing variables without user intervention.
I have tried using
CFLOCATION URL="FileName.cfm&#Var1#&#Var2# but I get an error saying this page does not exist.

I want to pass a variable from one page to the next without forms or URLs or any kind of userintervention, CFLOCATION does half the job....ANyone have any ideas?

Thanks
Sam...
 
The following line is incorrect:

CFLOCATION URL="FileName.cfm&#Var1#&#Var2#

It should be:

CFLOCATION URL="FileName.cfm?#Var1#&#Var2#

The querystring starts from the question mark (?), so anything after this question mark is considered a variable. :) Hope this helps...

<webguru>iqof188</webguru>
 
Whoops, missed a part :). Correct syntax is:

CFLOCATION URL=&quot;FileName.cfm&Var1=#Var1#&Var2=#Var2#

Thanks...




<webguru>iqof188</webguru>
 
Sam,
I realize that you posted this some time ago. But what kind of variable are you wanting to pass ? There are several methods that could be used depending on the type and origination of the variable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top