D
dayton
I have a form that is dynamiclly generated from a database. Using the
CGI module, I'm trying to parse the parameters returned, but since the
number of paramaters changes I can't get the variables assigned...
What I'm trying:
--------------
$count='1';
while (my(@data)=$table_data4->fetchrow_array) {
print qq|
<tr><td><input name=rs$count type=text
maxlength=7 size=7 value=$data[0]><td>$data[1]
|;
$count++;
}
--------------------
which correctly populates the table but then when I try to parse the
parms..
(like : if (param()){ $buh = param('buh') || '';}
I run into my problem. I've tried:
----------------------
for ($i=1;$i<=$number;$i++)
$R$i="rs$i";
}
----------------------
and the error I get is:
Scalar found where operator expected at ./test line 5, near "$RS$i"
(Missing operator before $i?)
syntax error at ./test line 5, near "$RS$i"
Execution of ./test aborted due to compilation errors.
How can I auto-generate the variables based on the # of params created
by the form?
CGI module, I'm trying to parse the parameters returned, but since the
number of paramaters changes I can't get the variables assigned...
What I'm trying:
--------------
$count='1';
while (my(@data)=$table_data4->fetchrow_array) {
print qq|
<tr><td><input name=rs$count type=text
maxlength=7 size=7 value=$data[0]><td>$data[1]
|;
$count++;
}
--------------------
which correctly populates the table but then when I try to parse the
parms..
(like : if (param()){ $buh = param('buh') || '';}
I run into my problem. I've tried:
----------------------
for ($i=1;$i<=$number;$i++)
$R$i="rs$i";
}
----------------------
and the error I get is:
Scalar found where operator expected at ./test line 5, near "$RS$i"
(Missing operator before $i?)
syntax error at ./test line 5, near "$RS$i"
Execution of ./test aborted due to compilation errors.
How can I auto-generate the variables based on the # of params created
by the form?