A normal HTML page with form post to a the CGI script below, which in turn generates a page. How do I default data into the value= of the form-to-be generated?
Here is the cgi (it is being posted-to by a normal html form-post sending 'amount', 'first' and 'last'
NOTE: the calling of the "HOP" file and the "insert_signature" thing are not at issue...they work....it's the defaulting of values into the input fields on the page being built that is my problem.
---------------------------------------------
#!/usr/bin/perl -I.
use CGI qw/:standard/;
use HOP qw(insert_signature);
my $query = new CGI;
print $query->header(-type=>"text/html");
print<<EOF;
<html><body>
<h1>Sample Post</h1>
<p>This page creates a button (seen below) that will send the customer to the HOP to complete their order.<br />
The customer will be charged the amount they entered on the previous page, in this case:
EOF
;
print "<strong>\$" . $query->param('amount') ."</strong></p>\n";
print "<strong>\First name passed: " . $query->param('first') ."</strong></p>\n";
print "<strong>\Last name passed: " . $query->param('last') ."</strong></p>\n";
print<<EOF;
<form action=" method="post">
EOF
;
insert_signature($query->param('amount'));
print<<EOF;
<BR>First name (hopefully defaulted from prior html page): <input type="text" name="First" value="$query->param('first')">
<BR>Last name (hopefully defaulted from prior html page): <input type="text" name="Last" value="$query->param('last')">
<BR><BR><BR><input type="submit" name="submit" value="Donate Now!">
</form>
</body></html>
EOF
;
--------------------------------------
value="$query->param('first')" does not work.
My appologies for such a simple issue, but I am not an expert PERL programmer, and the CC gateway company's tech support for PERL is very deficient.
Link to this sequence in action:
John
Here is the cgi (it is being posted-to by a normal html form-post sending 'amount', 'first' and 'last'
NOTE: the calling of the "HOP" file and the "insert_signature" thing are not at issue...they work....it's the defaulting of values into the input fields on the page being built that is my problem.
---------------------------------------------
#!/usr/bin/perl -I.
use CGI qw/:standard/;
use HOP qw(insert_signature);
my $query = new CGI;
print $query->header(-type=>"text/html");
print<<EOF;
<html><body>
<h1>Sample Post</h1>
<p>This page creates a button (seen below) that will send the customer to the HOP to complete their order.<br />
The customer will be charged the amount they entered on the previous page, in this case:
EOF
;
print "<strong>\$" . $query->param('amount') ."</strong></p>\n";
print "<strong>\First name passed: " . $query->param('first') ."</strong></p>\n";
print "<strong>\Last name passed: " . $query->param('last') ."</strong></p>\n";
print<<EOF;
<form action=" method="post">
EOF
;
insert_signature($query->param('amount'));
print<<EOF;
<BR>First name (hopefully defaulted from prior html page): <input type="text" name="First" value="$query->param('first')">
<BR>Last name (hopefully defaulted from prior html page): <input type="text" name="Last" value="$query->param('last')">
<BR><BR><BR><input type="submit" name="submit" value="Donate Now!">
</form>
</body></html>
EOF
;
--------------------------------------
value="$query->param('first')" does not work.
My appologies for such a simple issue, but I am not an expert PERL programmer, and the CC gateway company's tech support for PERL is very deficient.
Link to this sequence in action:
John