Toenail fungus is caused by the same organism that causes athlete's feet. The fungus lives in the nail and causes thick, discolored nails that can be painful. Treatment with creams is ineffective in treating fungus that involves the nail. Therapy with oral medications such as terbinafine (Lamisil) can be used to cure toenail fungal infections. In patients with diabetes mellitus, it is important to treat foot and toenail fungus because the fungus can cause cracks in the skin leading to a serious foot infection. If you have thickened, discolored toenails see your dermatologist to determine if you have a fungal infection of the nails.