As it comes to replacing the leg, you might want to "Google" the string "folding table bracket" and you will find numerous solutions. One of them will be the previously mentioned rockler.com: http://www.rockler.com/product.cfm?page ... okietest=1.
Thanks,
Eugene