Update: This is a very old guide and there are much better examples available. If I were to to this again I would use one of the ESP8266 libraries that simplify the whole process. Libraries are available from the following links:
WiFi (ESP8266WiFi library)
Here is my first attempt at a web server using the ESP8266. It includes a request count and also a text input field.
Enter your name and hit submit