Results 1 to 4 of 4
im trying to make a form using cgi and perl. when i do something like
this:<html>
<body>
<h1>Hello there!</h1>
</body>
</html>
and
#! /usr/bin/perl
print "Content-type: text/html\n\n";
print "<html><body><h1>Hello World!";
...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-28-2006 #1Linux Newbie
- Join Date
- Oct 2005
- Posts
- 110
need help with perl
im trying to make a form using cgi and perl. when i do something like
this:<html>
<body>
<h1>Hello there!</h1>
</body>
</html>
and
#! /usr/bin/perl
print "Content-type: text/html\n\n";
print "<html><body><h1>Hello World!";
print "</h1></body></html>\n";
i does work i see the results of even if i use .c it works too
but when i try to do a form like this:<html><head><title>Guestbook Form</title></head>
<body>
<form action="post.cgi" method="POST">
Your Name: <input type="text" name="name"><br>
Email Address: <input type="text" name="email"><br>
Comments:<br>
<textarea name="comments" rows="5"
cols="60"></textarea><br>
<input type="submit" value="Send">
</form>
</body>
</html>
and perl code:
#!/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;
it gives me an 500 error page why is that how can i fix this error
what im trying to do is when a user enter text in the form i want to user to see the results just like when i post some here. but this is a lil over my head, can some1 help me
- 07-28-2006 #2Linux Newbie
- Join Date
- Oct 2005
- Posts
- 110
how to perl
any linux pro in here
- 08-02-2006 #3Linux Newbie
- Join Date
- Oct 2005
- Posts
- 110
wow
is this forums for windows or linux cause look like there no linux pro here, i guess this is for windows
- 08-14-2006 #4Linux Newbie
- Join Date
- Oct 2005
- Posts
- 110
wow
any linux pro


Reply With Quote
