home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / CHIPCD_02_2002.iso / Internet / Macromedia ColdFusion Server 5 / coldfusion-50-win-us.exe / data1.cab / Examples / CFDOCS / snippets / cfhttpparam.cfm < prev    next >
Encoding:
Text File  |  2001-06-13  |  1.5 KB  |  53 lines

  1. <!--- This example shows the use of CFHTTPPARAM --->
  2. <HTML>
  3. <HEAD>
  4. <TITLE>CFHTTPPARAM Example</TITLE>
  5. </HEAD>
  6.  
  7. <BASEFONT FACE="Arial, Helvetica" SIZE=2>
  8. <BODY  bgcolor="#FFFFD5">
  9. <H3>CFHTTPPARAM Example</H3>
  10.  
  11. <P>This view-only example shows the use of CFHTTPPARAM 
  12. to show the values of passed variables on another HTML
  13. reference, accessed by CFHTTP.  The other file 
  14. could simply output the value of form.formtest, 
  15. url.url_test, cgi.cgi_test, and
  16. cookie.cookie_test to prove that this page is working:
  17.  
  18. <H3>Sample Other File Listing</H3>
  19. <CFOUTPUT>#HTMLCodeFormat("
  20. <HTML>
  21. <HEAD>
  22. <TITLE>Sample Page</TITLE>
  23. </HEAD>
  24. <BODY>
  25. <H3>Output the passed variables</H3>
  26. <CFOUTPUT>
  27. Form variable: ##form.form_test##
  28. <br>URL variable: ##URL.url_test##
  29. <br>Cookie variable: ##Cookie.cookie_test##
  30. <br>CGI variable: ##CGI.cgi_test##
  31. </CFOUTPUT>
  32. </BODY>
  33. </HTML>
  34. ")#</CFOUTPUT>
  35.  
  36. <H3>For CFHTTPPARAM code, see right frame</H3>
  37. <P>
  38. <!------------------------------------------------------------------
  39. <CFHTTP METHOD="POST" URL="http://localhost/someotherfile.cfm">
  40. <CFHTTPPARAM NAME="form_test" TYPE="FormField" 
  41.   VALUE="This is a form variable">
  42. <CFHTTPPARAM NAME="url_test" TYPE="URL" VALUE="This is a URL variable">
  43. <CFHTTPPARAM NAME="cgi_test" TYPE="CGI" VALUE="This is a CGI variable">
  44. <CFHTTPPARAM NAME="cookie_test" TYPE="Cookie" VALUE="This is a cookie">
  45. </CFHTTP>
  46.  
  47. <CFOUTPUT>
  48.         #CFHTTP.FileContent#
  49. </CFOUTPUT> 
  50. ------------------------------------------------------------------>
  51.     
  52. </BODY>
  53. </HTML>