siddheshsawant has asked for the wisdom of the Perl Monks concerning the following question:
I was following the tutorial http://www.cgi101.com/book/ch4/text.html and copied the exact code of post.cgi. I place bot html & corresponding CGI code in /var/www/html directory and then visited the page through URL.When I used to press Submitt button the control transferred to the cgi page where I used to get the content of the CGI script as it like this :
-----------------------------------------------------------------------------------------------------------------------#!/usr/bin/perl -wT use CGI qw(:standard); use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use strict; print header; print start_html("Thank You"); print h2("Thank You"); my %form; foreach my $p (param()) { $form{$p} = param($p); print "$p = $form{$p}<br>\n"; } print end_html;
But the desired output is
Thank You Siddhesh
name = siddhesh
email = sid123@gmail.com
comments = hello !!!!
--------------------------------------------------------
Why is it so???
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Question on CGI-PERL
by Corion (Patriarch) on Mar 03, 2010 at 20:06 UTC | |
by siddheshsawant (Sexton) on Mar 03, 2010 at 20:13 UTC | |
by Your Mother (Archbishop) on Mar 03, 2010 at 20:32 UTC | |
|
Re: Question on CGI-PERL
by almut (Canon) on Mar 03, 2010 at 20:10 UTC | |
|
Re: Question on CGI-PERL
by toolic (Bishop) on Mar 03, 2010 at 20:07 UTC |