Solved

Using the GET Method

Posted on 1997-08-13
2
185 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
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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to dynamically set the form action using jQuery.

840 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