Hi,
As advised i used the hidden field, still am not able to access the server/host name.
Please check the following code snippet.
==========================
## FILE: test.cgi
##
use CGI::Pretty qw( :html3 :standard );
my $cgi = new CGI;
print $cgi->header,
$cgi->start_html('Submit User id');
print $head;
print start_form();
my $host = $cgi->param('host');
print "<font color=green> Please Enter the UserID for $host: </font>";
print $cgi->text_field('USER','',10);
print "\t\t".submit('action','Submit');
$cgi->hidden( -name=>'server', -value => $cgi->param('host'));
if (param()) {
my $test= $cgi->param('action');
if( $cgi->param('action') eq 'Submit') {
my $server = $cgi->param('server');
my $user_id = $cgi->param('USER');
print "UserID: $user_id and HOST: $server " ;
}
}
print endform; ## END of HTML form
print end_html;
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.