Hi again,
I am in the process of converting a perl program to cgi so it can be run from a website instead of locally on my machine, and my question is about passing variables to the program - the code i have so far looks like this:
so basically the user enters an ID and this is looked up as the key in a hash of arrays, if it is found the associated array is returned. the user types this ID into a form, and my problem is how do I pass this variable as $ID to the above code? I am using cgi.pm,
cheers for any advice
I am in the process of converting a perl program to cgi so it can be run from a website instead of locally on my machine, and my question is about passing variables to the program - the code i have so far looks like this:
Code:
if (exists $HoA{$id}) {
print "$id has been located! Here are the associated values:\n";
@id_array = split(/ /, $HoA{$id});
foreach (@id_array) {
print "$_\n";
}
}
else {
print "This ID has not been found. Please enter another ID.\n";
}
so basically the user enters an ID and this is looked up as the key in a hash of arrays, if it is found the associated array is returned. the user types this ID into a form, and my problem is how do I pass this variable as $ID to the above code? I am using cgi.pm,
cheers for any advice