dimanche 20 décembre 2015

Have Raspberry Pi nginx webpage save checkbox state?

I have a Raspberry Pi running an nginx webpage that uses PHP to change the state of the GPIO pins and turn relays on and off.

Currently I have a checkbox that switches the pin on and off no problem, the problem is that if the page is refreshed or opened in another browser or device the checkbox will revert back to the off position. This doesn't effect the GPIO.

I want to have the state of the checkbox saved on the server end so that when the page is loaded it shows weather the GPIO is on or off, I don't want to use cookies or local storage because that only effects a single browser on a single device.

I have been looking around for a solution but can't seem to find one that fits my issue, any help or suggestions are greatly appreciated.




Aucun commentaire:

Enregistrer un commentaire