company1|www.company1.com|absolute_path1 company2|www.company2.com|absolute_path2 company3|www.company3.com|absolute_path3 etc... #### #!perl use strict; use CGI; $|=1; my $db="g:/Scripts/Indigo/cgi-bin/company.db"; my $query=new CGI; my $g_debug=0; my $path='g:/Scripts/Indigo/cgi-bin/'; my $rc=0; my ($u,$p); my $userid=$query->param('userid'); my $url=$query->param('url'); # open the text database unless(open(PFD,$db)) { &printError("Could not open user database"); return; } # first check if user exist $path=''; while () { chomp; ($u,$p,$path)=split('\|',$_);###$u loop?? how? if ($userid eq $u) { $rc=1; last; } } close(PFD); print $query->popup_menu(-name=>'userid', -values=>[$u]);## $u needs loop to pull all company entries from $db