Solved

Using the GET Method

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now