List:General Discussion« Previous MessageNext Message »
From:Douglas Brantz Date:January 27 2002 6:27pm
Subject:Help with formating data in textarea
View as plain text  
Sorry to bother again but does anyone know how to do the following?

I'm interested in learning more about the following:  The only reason I'm writing to
this list is that I've had such great help in the past and I've been looking for new
ways of displaying data from mysql so why not go to the source.

format DATA =
 @<<<<<<<<<<<< 
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 @####
$sec, $title, $seats
.

$~ = DATA;          # sets current format
write;            # write formatted data


I would like to get data out of mysql and then write the format with all data to a
variable and print it out in a textarea.
Below is the code I am currently working with.  I'd like to keep the output in a
textarea so the user can scroll through a formated list.

my @arrinstr=();
my $list="";
while (@arrinstr = $sth4->fetchrow)
{
($sec,$title,$seats)=@arrinstr;
$list.="$sec    $title     $seats  \n";
}
#print "$list";
print $query->textarea
({-name=>'INFO',-default=>$list,-cols=>'75',-rows=>'5'});
Any help or links to a sourse would be great - Thanks,
Douglas




Thread
Help with CodeDouglas Brantz27 Jan
  • Help with formating data in textareaDouglas Brantz27 Jan