I've recently slightly adapted the standard "WebServer" demo to have it display a reading from a light sensor connected to the Arduino, and to accept commands when users click on buttons on the page served.
The buttons turn an LED attached to the Arduino on or off. It shines on the light sensor, thus you can "see" from across the world whether the LED actually DID come on or go off. (Someone in Berlin did that a few minutes ago. The ArduServer is near New York City.)
The light sensor/ LED setup is just by way of a demo. You can change the sensor, change what's connected to the output, add more buttons/ outputs/ sensors.
The full code for the ArduServer2 is at the end of....http://sheepdogguides.com/arduino/art5serv1.htm