Hi, I'm a new guy and I hope this question has not been answered over and over..........
I have a web page with a form that has several hidden fields. When the submit button is pressed it calls a cgi script. That script sends out a couple of emails and creates a second web page with a form with some of the hidden fields from the first page. When the submit button on the second form is pressed it calls a cgi script from a commercial card processing company.
The problem comes when I build the second form. The information in some of the fields has two or more words, such as "PersonsName". If the name is Rich Giles, only the Rich gets passed to the second forms field. There are several fields that have more than one word in them.
An example of the script is:
my $personname;
$personname="Rich Giles"; (it fails even if I hard code the value into the variable)
print "All the page required lines"
print '<body>';
print '<form name="entry" method="POST" action="print "<input type='hidden' name='card-name' value= $personname>";
print "<input type='submit' name='Button' value='CLICK HERE TO PROCESS THE PAYMENT' />";
The resulting field on the form only shows "Rich".
If I hard code "Rich Giles" into the "card-name" input line, both names are passed.
If I cause $personname to print on the second web page it prints both names "Rich Giles"
If I remove the type='hidden' from the "card-name" input line so I can see the value setting there before I click submit, what shows is one name, "Rich" only.
Is there something I need to know about scaler variables and building a web form in Perl?
Thanks
Rich
I have a web page with a form that has several hidden fields. When the submit button is pressed it calls a cgi script. That script sends out a couple of emails and creates a second web page with a form with some of the hidden fields from the first page. When the submit button on the second form is pressed it calls a cgi script from a commercial card processing company.
The problem comes when I build the second form. The information in some of the fields has two or more words, such as "PersonsName". If the name is Rich Giles, only the Rich gets passed to the second forms field. There are several fields that have more than one word in them.
An example of the script is:
my $personname;
$personname="Rich Giles"; (it fails even if I hard code the value into the variable)
print "All the page required lines"
print '<body>';
print '<form name="entry" method="POST" action="print "<input type='hidden' name='card-name' value= $personname>";
print "<input type='submit' name='Button' value='CLICK HERE TO PROCESS THE PAYMENT' />";
The resulting field on the form only shows "Rich".
If I hard code "Rich Giles" into the "card-name" input line, both names are passed.
If I cause $personname to print on the second web page it prints both names "Rich Giles"
If I remove the type='hidden' from the "card-name" input line so I can see the value setting there before I click submit, what shows is one name, "Rich" only.
Is there something I need to know about scaler variables and building a web form in Perl?
Thanks
Rich