View previous topic :: View next topic |
Author |
Message |
brent_weaver Guru
Joined: 01 Jul 2004 Posts: 510 Location: Burlington, VT
|
Posted: Tue Nov 27, 2012 12:20 pm Post subject: Help a newb with Perl CGI forms [solved] |
|
|
Hello there. I am new to Perl CGI (not base perl) and need to create a two field. Both are really free text fields. The issue I have is getting the text boxes to be one on top of the other (as opposed to horizontal). This is the code I have:
Code: |
#!/usr/bin/perl
use strict;
use warnings;
use Config::IniFiles;
use CGI qw/:standard/;
use vars qw ( @TMP $TITLE $CUR );
$TITLE = "Nagios On-Call Update";
if ( -e "/var/nssoncall/oncall.ini" ) {
open(IN,"</var/nssoncall/oncall.ini");
@TMP = <IN>;
close IN;
$TITLE = $TITLE . " [Current = $TMP[0]] ";
}
print header,
start_html('Nagios On-Call Updater'),title('NagiosOnCall'),
hr,
h1($TITLE),
start_form,
textfield( -name => 'address', -size => 40, -maxlength => 40),
textfield( -name => 'name', -size => 40, -maxlength => 40),
submit(-name=>'Activate'),
end_form,
;
if (param()) {
my $address = param('address');
my $name = param('name');
system "echo $address > /var/nssoncall/oncall.ini";
print "<meta http-equiv=\"REFRESH\" content=\"0;url=/nagios/cgi-bin/oncall.cgi\">";
}
|
As always, any help is much appreciated! _________________ Brent Weaver
Last edited by brent_weaver on Thu Nov 29, 2012 12:59 pm; edited 1 time in total |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Wed Nov 28, 2012 1:56 am Post subject: |
|
|
Sounds like you want a HTML <br> tag after the first one. |
|
Back to top |
|
|
brent_weaver Guru
Joined: 01 Jul 2004 Posts: 510 Location: Burlington, VT
|
Posted: Thu Nov 29, 2012 1:03 pm Post subject: |
|
|
Thank you for the response! _________________ Brent Weaver |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|