I was able to control an led from a web page using the following code. when I call http://myip/pinon.php it will light up the LED and http://myip/pinoff.php will turn off the LED.
pinon.php
<?php
system(“ gpio-g mode 24 out “) ;
system(“ gpio-g write 24 1”) ; ?>
pinoff.php
<?php
system(“ gpio-g mode 24 out “) ;
system(“ gpio-g write 24 0”) ; ?>
Now I want to read input through GPIO pin when I access http://myip/readgpio.php file.
Is it possible to display a message "button pressed" on the web page(readgpio.php) When a button is pressed or when there is a voltage change on the GPIO pin?