CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [bhumika] Submit PHP form to perl script: Edit Log



Zhris
Enthusiast

Apr 5, 2011, 1:36 PM


Views: 8887
Re: [bhumika] Submit PHP form to perl script

Hi,

Example PHP form:

Code
<?php 
?>
<form method="post" action="script.pl">
<textarea name="mytextarea">textarea content</textarea>
<input type="submit" name="submit" value="submit" />
</form>


Example Perl script (script.pl), to retrieve form data:

Code
#!/usr/bin/perl 
use strict;
use warnings;
use CGI ':standard';

my $mytextarea = param('mytextarea');

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


Look into the CGI module for more information (http://search.cpan.org/dist/CGI/lib/CGI.pm).

Chris


(This post was edited by Zhris on Apr 5, 2011, 2:17 PM)


Edit Log:
Post edited by Zhris (Enthusiast) on Apr 5, 2011, 1:36 PM
Post edited by Zhris (Enthusiast) on Apr 5, 2011, 1:39 PM
Post edited by Zhris (Enthusiast) on Apr 5, 2011, 1:39 PM
Post edited by Zhris (Enthusiast) on Apr 5, 2011, 1:40 PM
Post edited by Zhris (Enthusiast) on Apr 5, 2011, 2:17 PM
Post edited by Zhris (Enthusiast) on Apr 5, 2011, 2:17 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives