Newbie question - passing variables (aka why does this work?)
I spent a few hours unsuccessfully trying to pass the value of an html text box to a 2nd coldfusion page via the URL (query string).
However, it seems I don't have to do that because the 2nd page seems to be able to reference the text box value anyways. My question is: Is this a fluke or is this the normal way things work? When I click the "Run Report" button, whatever I typed in the text box shows up on the screen from page2.cfm. I thought that I would have to pass this value somehow (via URL string or session variables or something).
So, my newbie question is: Is this the way it should work (a simple Yes or No answer is fine)? A text box from one .CFM file can reference the text box value from another .CFM page? Thanks in advance
Here's page 1 (page1.cfm):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<body>
<CFform action="http://www.mywebsite.com/page2.cfm" method="get">
Cust ID: <cfinput type="text" name="custid">
<input type=submit value="Run Report">
</CFFORM>
</body>
</html>
Here's page 2(page2.cfm) which works fine and displays whatever I typed in the text box:
<CFOUTPUT>
#CUSTID#
</CFOUTPUT>