Solved

Using the GET Method

Posted on 1997-08-13
2
189 Views
Last Modified: 2013-12-25
How do I parse the input from an HTML when using the GET method (using perl)?
0
Comment
Question by:ron_sh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
gabsi earned 10 total points
ID: 1829658
When you use the get method, data is palced in argv, exactly like if you make
pgm.pl arg1 arg2 arg3....
If you use FORMs, it becomes like:
pgm.pl fied1=value1 field2=value2...
0
 
LVL 2

Expert Comment

by:aleshka
ID: 1829659
There is two variants:

1. When you receive GET requests, you have two environment  variables setted:

 REQUEST_METHOD=GET - to be shure that method is GET.
 QUERY_STRING=field1=val1&field2=val2 etc.. - it you must parse.

2. Use CGI perl module which will do all needed work and will give you all parameters in very nice form, you just call some function from it "param" with field name and receives its value.

PS: if you are using CGI module, you even don't need to know, which method is used now, You'll receive all parameters in same manner for GET, POST and even CGI Upload (mulltipart) methods.

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
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…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

690 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