CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Reading HTML parameters

 



RayStreet
Deleted

Jan 1, 2000, 5:57 PM

Post #1 of 3 (2586 views)
Reading HTML parameters Can't Post

I have an HTML page which is dynamically built from a search using cgi/perl. There are several products on the page and each product has a reference. There is an HREF link from each product which passes the product code preceded by a "?" (for example, the href link is /cgi-bin/proddets.cgi?ABCDE"). How do I pick up the code in the cgi/perl program? It's not in any of the $ENV areas that I can find.


Borderline
Deleted

Jan 2, 2000, 10:24 AM

Post #2 of 3 (2586 views)
Re: Reading HTML parameters [In reply to] Can't Post

It should be in $ENV{QUERY_STRING}. Here are some of the ENV variables along with a query string.

If you are going to write CGI's with Perl I would highly recommend you use the standard library for CGI's,CGI.pm. It provides methods for retrieving the query string along with a lot more helpful things.

Scott


RayStreet
Deleted

Jan 2, 2000, 1:54 PM

Post #3 of 3 (2586 views)
Re: Reading HTML parameters [In reply to] Can't Post

Thanks for the reply Borderline. I was using the QUERY_STRING variable but it was always empty. After a lot of debugging and messing about I discovered my problem was caused by the product codes beginning with the hash (#) symbol - once I removed the # then everything worked just fine.

Ray

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives