Erase old iPhone - forgotten restrictions passcode and no WiFi
You can wipe your iPhone with iTunes: Apple's support page

Sometimes, it's also possible to recover the restrictions passcode, but that requires a lot of work. 2