If the phone says it is connected, then the WiFi may be working properly. WiFi is only a link between the phone and the router. It does not go anywhere near the Internet.
What sort of phone is it? This is very important information for a question like this. Is it configured with static addresses, or does it get its addresses using DHCP?
If it is a Windows phone, and has been configured with static addresses, then it is probably due to the fact that the static addresses are not compatible with the router settings. Unfortunately, Windows associates addresses with physical hardware, so static addresses apply to every WiFi network to which the phone is connected. Microsoft got it wrong. In contrast, Android associates addresses with individual WiFi networks so one WiFi network can use static addresses while a different WiFi network uses DHCP for its addresses.
Without the information about the phone and its operating system, I cannot go any further.