hunter13605
Technical User
I am writing a program to find the mode of a group of numbers. I want to send a string of numbers from gerdata.pl to save.pl.
This is the form code from getdata.pl
#-----------------------------------------------------------
print"<TABLE>
<FORM ACTION=save.pl METHOD='post'>
<INPUT TYPE='hidden' NAME='size' VALUE=$size>";
for($i = 1; $i <= ($size); ++$i)
{
print "
<TR BGCOLOR='beige' valign='top'>
<TD><FONT FACE='arial' SIZE='2' COLOR='black'><div align='left'>$i</TD>
<TD><FONT FACE='arial' SIZE='2' COLOR='black'><div align='left'><INPUT TYPE='textbox' SIZE='5' NAME='number[$i]' VLAUE=$number[$i]></TD>
</TR>";
}
print "</TABLE>";
print "<INPUT TYPE='submit' VALUE='FIND RESULTS'>";
print "</FORM>";
#----------------------------------------------------------
This is the code that i am using to recieve the string. It dosen't appear to work.
#-----------------------------------------------------------
$size= $query->param('size');
for($i = 1; $i <= ($size); ++$i)
{
$number[$i]= $query->param('number[$i]');
}
#-----------------------------------------------------------
I am getting the number of numbers on the string and then using a for loop to recieve the numbers. In my mind and in c++ files that i have written it would seem that it should work perfectly but i can't seem to get it to work. Please help.
This is the form code from getdata.pl
#-----------------------------------------------------------
print"<TABLE>
<FORM ACTION=save.pl METHOD='post'>
<INPUT TYPE='hidden' NAME='size' VALUE=$size>";
for($i = 1; $i <= ($size); ++$i)
{
print "
<TR BGCOLOR='beige' valign='top'>
<TD><FONT FACE='arial' SIZE='2' COLOR='black'><div align='left'>$i</TD>
<TD><FONT FACE='arial' SIZE='2' COLOR='black'><div align='left'><INPUT TYPE='textbox' SIZE='5' NAME='number[$i]' VLAUE=$number[$i]></TD>
</TR>";
}
print "</TABLE>";
print "<INPUT TYPE='submit' VALUE='FIND RESULTS'>";
print "</FORM>";
#----------------------------------------------------------
This is the code that i am using to recieve the string. It dosen't appear to work.
#-----------------------------------------------------------
$size= $query->param('size');
for($i = 1; $i <= ($size); ++$i)
{
$number[$i]= $query->param('number[$i]');
}
#-----------------------------------------------------------
I am getting the number of numbers on the string and then using a for loop to recieve the numbers. In my mind and in c++ files that i have written it would seem that it should work perfectly but i can't seem to get it to work. Please help.