Solved

CGI '?' '&' ...

Posted on 1997-03-06
1
190 Views
Last Modified: 2013-12-25
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
Comment
Question by:dtww
1 Comment
 

Accepted Solution

by:
henryj earned 50 total points
ID: 1827638
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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question