Since you have said that your user selects a project from a drop down list, so I am guessing that you're using either the HSDK or JHSDK in a custom program you have created. Would this be correct?
You could use SQL to get a list of packages in a specific project:
select packagename
from harpackage
where envobjid = (select envobjid from harenvironment where environmentname = 'My Project');
Or to get a list of packages in a specific project and state:
select packagename
from harpackage
where envobjid = (select envobjid from harenvironment where environmentname = 'My Project')
and stateobjid = (select stateobjid from harstate where statename = 'My State');
Or find the project and state for a package:
select environmentname, statename
from harpackage, harstate, harenvironment
where harpackage.stateobjid = harstate.stateobjid
and harpackage.envobjid = harenvironment.envobjid
and packagename = 'My Package';
Let me know if this helps.