home *** CD-ROM | disk | FTP | other *** search
/ c't freeware shareware 1997 / CT_SW_97.ISO / pc / software / entwickl / win95 / plsei306.exe / aspSamples / qstring.asp < prev    next >
Text File  |  1997-03-22  |  1KB  |  43 lines

  1. <%@ LANGUAGE = PerlScript%>
  2. <HTML>
  3. <HEAD>
  4. <!-- 
  5.     Copyright (c) 1996, Microsoft Corporation.  All rights reserved.
  6.     Developed by ActiveWare Internet Corp., http://www.ActiveWare.com
  7. -->
  8. <TITLE> Demonstration of the Request-QueryString Object</TITLE>
  9. </HEAD>
  10. <BODY> <BODY BGCOLOR=#FFFFFF>
  11. <!-- 
  12.     ActiveWare PerlScript sample 
  13.     PerlScript:  The coolest way to program custom web solutions. 
  14. -->
  15.  
  16. <!-- Masthead -->
  17. <TABLE CELLPADDING=3 BORDER=0 CELLSPACING=0>
  18. <TR VALIGN=TOP ><TD WIDTH=400>
  19. <A NAME="TOP"><IMG SRC="PSBWlogo.gif" WIDTH=400 HEIGHT=48 ALT="ActiveWare PerlScript" BORDER=0></A><P>
  20. </TD></TR></TABLE>
  21.  
  22. <A HREF="<%=$Request->ServerVariables('PATH_INFO')->item%>?Size=Medium&Color=Yellow">
  23. This link will demonstrate the Request->QueryString object.</A><P>
  24. The current value of Size is <%= $Request->querystring('Size')->item %><BR>
  25. The current value of Color is <%= $Request->querystring('Color')->item %><BR>
  26.  
  27. <!-- +++++++++++++++++++++++++++++++++++++
  28. here is the standard showsource link - 
  29.     Note that PerlScript must be the default language --> <hr>
  30. <%
  31.     $url = $Request->ServerVariables('PATH_INFO')->item;
  32.     $_ = $Request->ServerVariables('PATH_TRANSLATED')->item;
  33.     s/[\/\\](\w*\.asp\Z)//m;
  34.     $params = 'filename='."$1".'&URL='."$url";
  35.     $params =~ s#([^a-zA-Z0-9&_.:%/-\\]{1})#uc '%' . unpack('H2', $1)#eg;
  36. %>
  37. <A HREF="index.htm"> Return </A>
  38. <A HREF="showsource.asp?<%=$params%>">
  39. <h4><i>view the source</i></h4></A>  
  40.  
  41.  
  42. </BODY>
  43. </HTML>