Don't use hot glue. Use super glue gel. Take the coral out of the water and apply a generous amount of the glue gel and then stick it to whatever you want. You'll have to hold it in place for a minute or so to allow the glue to set up and stick. Make sure not to get the tip of the glue bottle wet or it will start to activate the glue in the bottle and make it set up.
If the corals are too small to glue directly to the large piece of live rock then glue them to a smaller piece of rubble and then glue that rock to the larger one.