Here’s a Raspberry Pi hack that adds web control using PHP and MySQL. As you can see in the image, it serves up a webpage (using the Apache2 server) which allows you to change the state of the GPIO pins. It’s not super-complicated, but it is nice to see a step-by-step guide for installing and configuring the package.
Web interface GPIO control is one of the features we loved about the Adafruit Web IDE. But this offering is loaded completely from the RPi (the Adafruit package uses cloud based code) and utilizes the tools most Linux network admins will be used to. A MySQL database manages the connection between GUI commands and GPIO modification. The webpage is served up by a PHP script which takes care of polling and changing database values. Configuration requires a new database, plus the username and password which has access to it.
http://hackaday.com/2013/02/02/easy-...-raspberry-pi/