in reply to Re: Re: Drop Down Selection #2
in thread Drop Down Selection #2
That should work, but in your code you do a last if $userid eq $u, which means @users will store all the users in the list until the one that matches $userid... not sure if that is what you want.# open the text database unless(open(PFD,$db)) { &printError("Could not open user database"); exit(1); } my @users; # first check if user exist $path=''; while (<PFD>) { chomp; ($u,$p,$path)=split('\|',$_);###$u loop?? how? push @users, $u; if ($userid eq $u) { $rc=1; last; } } close(PFD); print $query->popup_menu(-name=>'userid', -values=>\@users);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 4: Drop Down Selection #2
by tilly (Archbishop) on May 09, 2001 at 11:39 UTC | |
|
Re: Re: Re: Re: Drop Down Selection #2
by koacamper (Acolyte) on May 09, 2001 at 06:35 UTC |