Appending to a variable?

Hey, I'm creating a custom useradd script, and I'm giving the option to add secondary groups. Basically what I want to do is ask for the name of the group, you type in the group you want to add, it assigns that group name to the variable $sgroup. Then the scripts asks if you want add another. If you say yes, then I want it to grab the next one you type in, and append it with a comma to the end of $sgroup.

So when all is said and done, if you have added three groups, then the value of $sgroup would be like this:
$sgroup="group1,group2,group3"

See what I mean, that way, when I'm doing the useradd command in my script, I can just use the -G option, and say, "-G $sgroup"

I'm trying to use a while loop to do it, but it doesn't seem to be working. How should I go about doing this?

I'll post my current code below, but you don't need to look at it if you don't want. It's kind of lengthy for such a simple thing. FYI, I know this code doesn't work, currently, if you choose to add another, it will just overwrite the old $sgroup with a new group name.

echo "Would you like to add any secondary groups to this account [y/n]:"
read cont
while [[ $cont = "y" || $cont = "yes" ]]
do
   echo "Type the name of the group, or hit enter to list all available groups:"
   read sgroup
   if [[ $sgroup = "" ]]
        then
        awk -F: '{ print $1 }' /etc/group
        echo "Type the name of the group:"
        read sgroup
        awk -F: '{ print $1 }' /etc/group | grep -qx $sgroup
        while [ $? != "0" ]
           do
           echo "That group does not exist."
           echo "Type the name of the group, or hit enter to list all available groups:"
           read sgroup
           if [[ $sgroup = "" ]]
                then
                awk -F: '{ print $1 }' /etc/group
                echo "Type the name of the group:"
                read sgroup
                awk -F: '{ print $1 }' /etc/group | grep -qx $sgroup 
           fi
           awk -F: '{ print $1 }' /etc/group | grep -qx $sgroup
           done
   else
        awk -F: '{ print $1 }' /etc/group | grep -qx $sgroup
        while [ $? != "0" ]
           do
           echo "That group does not exist."
           echo "Type the name of the group, or hit enter to list all available groups:"
           read sgroup
            if [[ $sgroup = "" ]]
                then
                awk -F: '{ print $1 }' /etc/group
                echo "Type the name of the group:"
                read sgroup
                awk -F: '{ print $1 }' /etc/group | grep -x $sgroup
            fi
            awk -F: '{ print $1 }' /etc/group | grep -x $sgroup
            done

   fi

echo "You have added $username to $sgroup.  Add another? [y/n]:"
read cont
done