in reply to Re: Generating a
in thread Generating a "print list"

O.k... here is the code that opens the file and declares the variables...
sub a { open(DATA, "<$config{'basepath'}/data.out") || die "Can't open file: $ +!"; @lines = <DATA>; close (DATA); $listings = 0; foreach $temp (@lines){ ($num,$date,$desc) = split(/\|/,$temp); if ($num =~ /^123$/) { print "$desc\n"; $listings = 1;} } if ($listings eq "0") {print "There are no listings for "123" at this +time.\n";} }
The user has a clickable link to see if any '123' listings are in the file..
<A HREF=$ENV{'SCRIPT_NAME'}?action=a>Click for '123' listings</a><br>
Example of return if '123' exists:

Results for '123':

Apple - Click HERE to add to list
Pear  - Click HERE to add to list     
Orange - Click HERE to add to list
Grapefruit - Click HERE to add to list
Banana - Click HERE to add to list

I would like to be able to have a link at the end of each return value that would "build" a list of the ones the user wants..

So if they clicked next to Orange and Grapefruit and they were done searching, they would click a link that would let them print a list that would just have Orange and Grapefruit in it...

Hope this helps...

_______SysAdm

Edit 2001-03-08 by tye

Replies are listed 'Best First'.
Re: Re: Re: Generating a
by archon (Monk) on Mar 09, 2001 at 13:22 UTC
    Sounds like you want a radio group. Check the CGI module for information on how to build radio_groups with it. (You _are_ using CGI.pm, aren't you?).