Hi,
I'm parsing some form variables and in some cases the param name could be the same. If so, I would like to append the value.
Example:
Name is TYPE and value 1 = AT, value 2 = PT etc
So I want to end a value of AT,PT for the TYPE name.
Current code is not working....
Thanks in advance.
I'm parsing some form variables and in some cases the param name could be the same. If so, I would like to append the value.
Example:
Name is TYPE and value 1 = AT, value 2 = PT etc
So I want to end a value of AT,PT for the TYPE name.
Current code is not working....
Code:
# Convert FORM params into an Hash
foreach my $param ($cgi->param) {
# Define Value
$value = $cgi->param($param);
# If name already exist, add comma and append value
if ($input{$param}) {
$input{$param} .= ",$value";
}
else {
$input{$param} = $value;
}
}
Thanks in advance.