View Single Post
  #7 (permalink)  
Old 10-17-06, 09:47 PM
Oleks Oleks is offline
Newbie Coder
 
Join Date: Oct 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Drunken Perl Coder
a simple example based on your simple example:
The script prints the forms instead of trying to use a static html page. This is much simpler than what you propose unless you switched to PHP.
Hi Drunken Perl Coder,
Thank you for your help.
But ….
In your example, perl file will run first until the end of the script and will not wait for data entering in Form 1. Only after this first run user will be able to enter something into the form 1.
How to solve this.

Try this code and you will see my point.

Code:
#!/usr/bin/perl

use CGI qw/:standard/;
my $Test = param('Test') || undef;

print header,
      start_html('HTML form'),
qq~<FORM NAME="form1" 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="blah" VALUE="$Test" SIZE="16" MAXLENGTH="50">
</FORM>~,
end_html;


print "First run\n";
Reply With Quote