Fasteners for Floor Underlayment

Topic: 
Flooring
Question: 

I'm replacing a kitchen floor. The original underlayment was masonite so I pulled it up. I'm going to put down a new layer of plywood underlayment on top of a 5/8 plywood subfloor. I will then put vinyl tile on top. My question is how to attach the plywood? Various sources have said staples, nails, screws, and glue. Nails seem to be the most popular answer, but part of the reason I'm replacing the floor is that the original underlayment was nailed and the nails were pulling loose and coming up through the tile. How do you recommend attaching the underlayment?

Answer: 

I think that you have the answer: "part of the reason I'm replacing the floor is that the original underlayment was nailed and the nails were pulling loose and coming up through the tile." Staples a