OK first you have to find out where the user data is being held then you have to call that data to the script. Then display the string that has the username in it.
Code:
$datafile = "/path/to/your/user/data/data.txt";
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/~!/ ~!/g;
$FORM{$name} = $value;
}
$string = $FORM{'id'};
open(INF,$datafile);
@mydata = <INF>;
close(INF);
$count = 0;
foreach $i (@mydata) {
chomp($i);
($id,$login,$email,$whatever,$whatever1,$whatever2) = split(/\&&/,$i); ## change && to what ever is between the strings
if (uc($id) eq uc($string)) {
print "$login\n";
}
}