To add PHP:

sudo apt-get update && sudo apt-get upgrade

sudo apt-get install python-dev
sudo apt-get install python-rpi.gpio

sudo apt-get install apache2 php5 libapache2-mod-php5

sudo service apache2 restart

sudo nano /etc/sudoers
 add to bottom of file:  www-data ALL=(root) NOPASSWD:ALL

<meta charset="UTF-8" />

if (isset($_POST['ON']))
exec("sudo python /home/pi/");
if (isset($_POST['OFF']))
exec("sudo python /home/pi/");
<form method="post">
<button name="ON">turn On</button>&nbsp;
<button name="OFF">turn Off</button><br>




Page views