Thankx for the help but i now find myself in another mess.
I now have two fields for each record - ShortRegion and Long Region. I want to use a select box that is automatically generated on my search page and only shows the values that appear in the DBASE. I want the box to show Long Region but carry out the search on short region i am using the code below but it doesnt wanna work. Any ideas much appreciated. I am using MS Access and ODBC My SQl Drive to update the database from my local PC so the use of the Short and Long Region fields is not too complex.
sub {
my $tags = shift;
my $table = $DB->table('JOBS_MASTER');
my $sth = $table->select (['DISTINCT SHORTREGION']);
my $output = '<select name=SHORTREGION><OPTION>';
while (my $row = $sth->fetchrow_hashref) {
$output .= '<option value='.$row->{SHORTREGION}.'>'.$row->{LONGREGION}.'</option>';
}
$output .= '</select>';
return $output;
}
Cheers
I now have two fields for each record - ShortRegion and Long Region. I want to use a select box that is automatically generated on my search page and only shows the values that appear in the DBASE. I want the box to show Long Region but carry out the search on short region i am using the code below but it doesnt wanna work. Any ideas much appreciated. I am using MS Access and ODBC My SQl Drive to update the database from my local PC so the use of the Short and Long Region fields is not too complex.
sub {
my $tags = shift;
my $table = $DB->table('JOBS_MASTER');
my $sth = $table->select (['DISTINCT SHORTREGION']);
my $output = '<select name=SHORTREGION><OPTION>';
while (my $row = $sth->fetchrow_hashref) {
$output .= '<option value='.$row->{SHORTREGION}.'>'.$row->{LONGREGION}.'</option>';
}
$output .= '</select>';
return $output;
}
Cheers