I had an infection in my foot and had to stay at the hospital. The doctor at the hospital said my foot needed to be amputated so I had it done. My wife’s friend, who is a podiatrist told me my foot didn’t need to be amputated. Did the doctor commit medical malpractice when he amputated my foot?

Not necessarily. In order for you to establish that medical malpractice has occurred, it must be proven that the physician who amputated your foot deviated from the accepted standard of care. Just because your wife’s friend would not have amputated does not mean the physician deviated from the standard of care. To have a case, you need to prove that no reasonable physician in that specialty would have amputated.
As each case is unique, consult a lawyer if you wish to discuss the specifics of your case.