[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 212
  • Last Modified:

CGI '?' '&' ...

Could someone / some people give working examples using QUERY_STRING method where the URL is of the form http://<somewhere>/<filename>?<something>.  Please don't refer me to books.
0
dtww
Asked:
dtww
1 Solution
 
henryjCommented:
Not sure why you want this - maybe your server is doing something odd and you want to check - but save this as test.pl (be sure
to convert crlf's to lf's if you're on UNIX).

#!/usr/bin/perl


$args=$ENV{'QUERY_STRING'};

print "content-type: text/html\n\n";
print "<html><body>\n";
print "Argument was $args\n";
print "</body></html>\n";


When you call /cgi-bin/test.pl?argument1 it should print out
argument1. Is this what you were after?

henry

0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now