Chosen Solution

I bought this phone second hand and realized that the microphone will work if its not on the earspeaker mode in a phone call, but if i put loudspeaker on the mic stops working and no one can hear me? If i order a new charging port and replace that is that my best bet to fixing this? I have heard there is two seperate mics located on the charging port and i assume one is for on loud speaker and one for regular ear speaker is this correct?

You’re sort of correct, microphones are three, all in different positions. The one that seems not to be working in your case is part of front Camera/Light/Proximity sensor flex assembly. If you need the kit with tools you can find it here: iPhone 6s Front Camera and Sensor Cable