iPhone Won't Connect to a Wi-Fi? 7 Steps to Fix Network Issue Without Replacing the Device
If your iPhone is not connecting to any Wi-Fi, but your friend or computer could still connect, then don't panic. There are many different reasons why this could happen. There are also easy steps how to fix the situation.
Source: itechpost.com