iPhone 3G and Known Networks
Like laptops, iPhone 3G keeps track of Wi-Fi networks by their profile. Wi-Fi profiles consist of the network name SSID and any login information including security (encryption) settings.Many public Wi-Fi hotspots do not utilize any security settings, and thus the iPhone cannot distinguish them from each other except by SSID. In other words, the iPhone will recognize all unsecured Wi-Fi networks with the same name as one network.
iPhone 3G Connection Prompts
When configuring the wireless settings of a iPhone 3G, you can specify the phone notify (prompt) you before connecting to a Wi-Fi network that doesn't match any of its existing profiles. Once accepted, the profile is added to the phone's database; you will not be prompted again in the future for any other new connections involving those networks.This logic protects your phone against attacks from unsafe networks, at least initially. Over time, however, you may notice the phone is connecting unexpectedly to networks you don't care to join. If malicious individuals set up a fake Internet hotspot using the right network name, your phone may connect to it without your knowledge, subjecting it and your data to possible infiltration.

