Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

text area form post, to new form on perl page

Status
Not open for further replies.

bigredmike24

Technical User
Mar 28, 2007
1
0
0
US
I need to have a user input an HTML form post, into a textarea, the textarea then needs to be submitted to a perl script, where the values passed will be called into the new form post. How can I write the text area code so it will post correctly to my perl script?
 
Here is the html page:
Code:
<html>
<head>
<title>Blah</title>
<body>
<h1>::.Form.::</h1>
Input a string:
<form name="form" method="post" action="/cgi-bin/perlform.cgi">
<input type="text" size="30" maxlength="30" name="text">
<p>
<input type="submit" name="submitbutton" value="Submit">
</form>
</body>
</html>

Here is your perl script:
Code:
#!/usr/bin/perl -w

print "Content-type: text/html\n\n"; 

use CGI;
use CGI::Carp qw(fatalsToBrowser); 

$query=CGI::new();
$input=$query->param("text");
print $query->header();
print $query->p("You entered: $input.");
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top