Question: how to connect an iphone to wifi using another iphone?
Answer: Make sure both devices have the latest version of iOS or iPadOS, or macOS High Sierra or later.
On both devices, turn on Wi-Fi and Bluetooth. ... 
Sign into iCloud with your Apple ID. ... 
Keep the other person's device nearby, within Bluetooth and Wi-Fi range.