Help me understand

Help me understand

Hi guys another question here
Im following the CUSTOM-ACTION-EXAMPLE thats posted in here, 
heres the function thats passing the multiple values to the stateless form to be  edited

void employee.showPayHikeForm(Employee employees)
{
querystring = "";
for each  employee in employees
{
querystring = querystring + "empid=" + employee.ID + "&";
}
openUrl("#Form:Salary_HikeForm?" + querystring,"popup window","height=400,width=400");
}

I noticed several problems with it as its is setup, I have a similar app that i want to implement this type of bulk edit on mine i just want to learn the process before touching mine

if you select on the main report more than 1 record trows an error "empid" canot be used atmost 1 time

i did a log on the empid and im getting a null value wich meand i cant retrive ani nfo nor modify its values 
can anyone please explain how exactly the ?, &, work? or a guide on openurl with a list of available paramaters and features
thanks in advance