Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    141

    Question HTML form 1 -> Perl -> results to HTML form 2 ???

    Hi,
    I am trying to return response from perl script to the HTML form. Those HTML form and perl file are located on a different servers. Form 1 is sending text to the form.pl file. File is processing that text. But, I do not know how to return response from perl file to the HTML form 2. Can somebody help me with this?

    The script for HTML form is

    <HTML>
    <HEAD>
    <TITLE>HTML form/TITLE>
    </HEAD>
    <BODY>
    <FORM NAME="form1" ACTION="http://www.domain.com/cgi-bin/form.pl" METHOD="POST">
    <INPUT TYPE="TEXT" NAME="Test" VALUE="" SIZE="18" MAXLENGTH="50"> <br>
    <INPUT TYPE="SUBMIT" NAME="submit" VALUE="Go!">
    </FORM>

    <FORM NAME="form2" METHOD="POST">
    is: <INPUT TYPE="TEXT" NAME="Test" VALUE="" SIZE="16" MAXLENGTH="50">
    </FORM>
    </BODY>
    </HTML>


    The script for perl file form.pl is

    #!/usr/bin/perl -w
    print "Content-type: text/html\n\n";

    use LWP:imple;

    $a = <STDIN>;

    # Do something simple
    $b = substr ($a, 5, length($a)-18);

    # print "Befor $a\n";
    # print "After $b\n";

    # How to return $b results to the HTML Form 2

  2. #2
    Join Date
    Apr 2002
    Location
    Denver, Colorado
    Posts
    269
    Check out the docs on CPAN about CGI.pm. It will simplify your CGI scripting a LOT. Then check out this CGI course.

    I'm not really understanding your question, you want the text to be returned to the form after it's posted to the first script?

  3. #3
    Join Date
    Feb 2002
    Location
    Vestal, NY
    Posts
    1,378
    And HTML form 2 is on the first machine or the 2nd?
    H4Y Technologies LLC Check out our new website!
    "Smarter, Cheaper, Faster" - SMB, Reseller, VDS, Dedicated, Colo hosting done right.

    ZERO PACKETLOSS, ZERO DOWNTIME Dedicated and Colo - USA: IA, CA, NC, OR, NV
    **http://h4y.us**
    Voice: (866)435-5642. *** Email: askus at host4yourself d0t com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •