I've bought the folding table legs before and attached them to a 1/4 or 1/2 sheet of plywood, good side up, of course. You can buy 1/4 or 1/2 sheets already cut for less than the cost of a whole sheet. But if you want more than one table, it would be cheaper to buy the whole sheet and have it cut, of cours.
I just painted the plywood before I attached the legs. Using the folding legs has the added benefit of being able to get the table out of the way, if needed, or using ir for something else temporarily.