Gossamer Forum
Home : General : Perl Programming :

Please help with checkboxes

Quote Reply
Please help with checkboxes
Hi,

Here is my problem, (I'm starting to pull out my hair). I have a script that adds to a database. Some of my fields have multiple values that I add through checkboxes. When I add a record and have multiple values for one of the fields, they all appear as though it's one word. How can I split the values of the checkbox so that I can read them later on as seperate values. Here is the way the script processes the fields to the database. I am not using cgi.pm


foreach $field (@db_fields)
{
$new_row .= "$form_data{$field}|";
}

chop $new_row;

$new_row .= "\n";

if (!$flock) { &get_file_lock("$location_of_lock_file"); }
open (DATABASE, ">>$data_file_path") ||
&file_open_error ("$data_file_path", "Submit Addition",
__FILE__, __LINE__);
if ($flock) { flock DATABASE, 2; }
print DATABASE $new_row;
close (DATABASE);


Thank a lot for your help

Subject Author Views Date
Thread Please help with checkboxes JFrost 2385 Jul 5, 2001, 12:36 PM
Post Re: Please help with checkboxes
Wil 2253 Jul 6, 2001, 1:57 AM