Not sure you can do that with your phone, my router is wireless and I have an Iphone and I can do exactly what your trying to do.
1) Your router must be wireless
2) Your phone must be capable of connecting wirelessly.
Rob