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 / urlencodedformat.cfm < prev    next >
Encoding:
Text File  |  2001-06-13  |  740 b   |  33 lines

  1. <!--- This example shows URLEncodedFormat --->
  2. <HTML>
  3.  
  4. <HEAD>
  5. <TITLE>
  6. URLEncodedFormat Example
  7. </TITLE>
  8. </HEAD>
  9.  
  10. <BASEFONT FACE="Arial, Helvetica" SIZE=2>
  11. <BODY  bgcolor="#FFFFD5">
  12.  
  13. <H3>URLEncodedFormat Example</H3>
  14.  
  15. <CFIF IsDefined("url.myExample")>
  16.  
  17. <P>The url variable url.myExample has been passed from the
  18. previous link ... its value is:
  19. <BR>"<CFOUTPUT>#url.myExample#</CFOUTPUT>"
  20.  
  21. </CFIF>
  22.  
  23. <P>This function returns a URL encoded string, making it 
  24. safe to pass strings through a URL.
  25. <CFSET the_string = "My url-encoded string has special characters & other stuff">
  26.  
  27. <P><a href="urlencodedformat.cfm?myExample=<CFOUTPUT>#URLEncodedFormat(the_string)#</CFOUTPUT>">Click me</A>
  28.  
  29.  
  30. </BODY>
  31.  
  32. </HTML>       
  33.