Copy an past this to your Notes in your iphone. If you remove your sims card you mite lose your settings and have reinstall them.
Here are those settings for you Apple iPhone in case you have trouble accessing the internet again in the future.

From the Main Menu select Settings > General > Network
Verify that Data Roaming is set to On
Verify that 3G Enable is set to Off
Verify that Wi-Fi is set to Off
Select Cellular Data Network
In the APN field, enter internet2.voicestream.com
Leave the Username and Password fields blank
To test connection, open up Safari and browse to a website.

Here are the settings for the Apple iPhone Picture Settings:
From the Main Menu select Settings > General > Network
Select Cellular Data Network
In the MMS APN field, enter wap.voicestream.com
Leave the Username and Password fields blank
In the MMSC field, enter http://216.155.174.84/servlets/mms
In the Proxy field, enter 216.155.165.050:8080
Leave the Max Sending Size and MMS UA PROF URL fields blank
To test the picture messaging, restart the iPhone and then create a new message, select the camera icon and try sending a picture message

Thank you for being a T-Mobile Customer and have a wonderful day!